From fd2e619a2fb263315816b3579a9c6751c398132d Mon Sep 17 00:00:00 2001 From: Doris Liu Date: Tue, 23 Apr 2013 11:00:37 -0700 Subject: Fix for popuping being hard to dismiss Bug: 8688503 Change-Id: I86f1451867d7606060e5f81fdd3b8b0af1e0a6d3 --- src/com/android/camera/VideoUI.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/com/android/camera/VideoUI.java') 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; } -- cgit v1.2.3