summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/camera/PhotoUI.java6
-rw-r--r--src/com/android/camera/PreviewGestures.java5
-rw-r--r--src/com/android/camera/VideoUI.java6
3 files changed, 11 insertions, 6 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index fd148bad7..ad04a4e92 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -389,9 +389,7 @@ public class PhotoUI implements PieListener,
}
public boolean dispatchTouchEvent(MotionEvent m) {
- if (mPopup != null) {
- return mActivity.superDispatchTouchEvent(m);
- } else if (mGestures != null && mRenderOverlay != null) {
+ if (mGestures != null && mRenderOverlay != null) {
return mGestures.dispatchTouch(m);
}
return false;
@@ -462,6 +460,7 @@ public class PhotoUI implements PieListener,
LayoutParams.WRAP_CONTENT);
lp.gravity = Gravity.CENTER;
((FrameLayout) mRootView).addView(mPopup, lp);
+ mGestures.addTouchReceiver(mPopup);
}
public void dismissPopup(boolean topPopupOnly) {
@@ -475,6 +474,7 @@ public class PhotoUI implements PieListener,
}
setShowMenu(fullScreen);
if (mPopup != null) {
+ mGestures.removeTouchReceiver(mPopup);
((FrameLayout) mRootView).removeView(mPopup);
mPopup = null;
}
diff --git a/src/com/android/camera/PreviewGestures.java b/src/com/android/camera/PreviewGestures.java
index 90ab075d2..0b80ff688 100644
--- a/src/com/android/camera/PreviewGestures.java
+++ b/src/com/android/camera/PreviewGestures.java
@@ -128,6 +128,11 @@ public class PreviewGestures
mReceivers.add(v);
}
+ public void removeTouchReceiver(View v) {
+ if (mReceivers == null || v == null) return;
+ mReceivers.remove(v);
+ }
+
public void addUnclickableArea(View v) {
if (mUnclickableAreas == null) {
mUnclickableAreas = new ArrayList<View>();
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index 79150e9fe..1da4c24ad 100644
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -295,6 +295,7 @@ public class VideoUI implements SurfaceHolder.Callback, PieRenderer.PieListener,
LayoutParams.WRAP_CONTENT);
lp.gravity = Gravity.CENTER;
((FrameLayout) mRootView).addView(mPopup, lp);
+ mGestures.addTouchReceiver(mPopup);
}
public void dismissPopup(boolean topLevelOnly) {
@@ -308,6 +309,7 @@ public class VideoUI implements SurfaceHolder.Callback, PieRenderer.PieListener,
}
setShowMenu(fullScreen);
if (mPopup != null) {
+ mGestures.removeTouchReceiver(mPopup);
((FrameLayout) mRootView).removeView(mPopup);
mPopup = null;
}
@@ -486,10 +488,8 @@ public class VideoUI implements SurfaceHolder.Callback, PieRenderer.PieListener,
}
public boolean dispatchTouchEvent(MotionEvent m) {
- if (mPopup == null && mGestures != null && mRenderOverlay != null) {
+ if (mGestures != null && mRenderOverlay != null) {
return mGestures.dispatchTouch(m);
- } else if (mPopup != null) {
- return mActivity.superDispatchTouchEvent(m);
}
return false;
}