Loading src/com/android/camera/PhotoUI.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -309,9 +309,7 @@ public class PhotoUI implements PieListener, } } public boolean dispatchTouchEvent(MotionEvent m) { public boolean dispatchTouchEvent(MotionEvent m) { if (mPopup != null) { if (mGestures != null && mRenderOverlay != null) { return mActivity.superDispatchTouchEvent(m); } else if (mGestures != null && mRenderOverlay != null) { return mGestures.dispatchTouch(m); return mGestures.dispatchTouch(m); } } return false; return false; Loading Loading @@ -382,6 +380,7 @@ public class PhotoUI implements PieListener, LayoutParams.WRAP_CONTENT); LayoutParams.WRAP_CONTENT); lp.gravity = Gravity.CENTER; lp.gravity = Gravity.CENTER; ((FrameLayout) mRootView).addView(mPopup, lp); ((FrameLayout) mRootView).addView(mPopup, lp); mGestures.addTouchReceiver(mPopup); } } public void dismissPopup(boolean topPopupOnly) { public void dismissPopup(boolean topPopupOnly) { Loading @@ -395,6 +394,7 @@ public class PhotoUI implements PieListener, } } setShowMenu(fullScreen); setShowMenu(fullScreen); if (mPopup != null) { if (mPopup != null) { mGestures.removeTouchReceiver(mPopup); ((FrameLayout) mRootView).removeView(mPopup); ((FrameLayout) mRootView).removeView(mPopup); mPopup = null; mPopup = null; } } Loading src/com/android/camera/PreviewGestures.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -128,6 +128,11 @@ public class PreviewGestures mReceivers.add(v); mReceivers.add(v); } } public void removeTouchReceiver(View v) { if (mReceivers == null || v == null) return; mReceivers.remove(v); } public void addUnclickableArea(View v) { public void addUnclickableArea(View v) { if (mUnclickableAreas == null) { if (mUnclickableAreas == null) { mUnclickableAreas = new ArrayList<View>(); mUnclickableAreas = new ArrayList<View>(); Loading src/com/android/camera/VideoUI.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -281,6 +281,7 @@ public class VideoUI implements SurfaceHolder.Callback, PieRenderer.PieListener, LayoutParams.WRAP_CONTENT); LayoutParams.WRAP_CONTENT); lp.gravity = Gravity.CENTER; lp.gravity = Gravity.CENTER; ((FrameLayout) mRootView).addView(mPopup, lp); ((FrameLayout) mRootView).addView(mPopup, lp); mGestures.addTouchReceiver(mPopup); } } public void dismissPopup(boolean topLevelOnly) { public void dismissPopup(boolean topLevelOnly) { Loading @@ -294,6 +295,7 @@ public class VideoUI implements SurfaceHolder.Callback, PieRenderer.PieListener, } } setShowMenu(fullScreen); setShowMenu(fullScreen); if (mPopup != null) { if (mPopup != null) { mGestures.removeTouchReceiver(mPopup); ((FrameLayout) mRootView).removeView(mPopup); ((FrameLayout) mRootView).removeView(mPopup); mPopup = null; mPopup = null; } } Loading Loading @@ -472,10 +474,8 @@ public class VideoUI implements SurfaceHolder.Callback, PieRenderer.PieListener, } } public boolean dispatchTouchEvent(MotionEvent m) { public boolean dispatchTouchEvent(MotionEvent m) { if (mPopup == null && mGestures != null && mRenderOverlay != null) { if (mGestures != null && mRenderOverlay != null) { return mGestures.dispatchTouch(m); return mGestures.dispatchTouch(m); } else if (mPopup != null) { return mActivity.superDispatchTouchEvent(m); } } return false; return false; } } Loading Loading
src/com/android/camera/PhotoUI.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -309,9 +309,7 @@ public class PhotoUI implements PieListener, } } public boolean dispatchTouchEvent(MotionEvent m) { public boolean dispatchTouchEvent(MotionEvent m) { if (mPopup != null) { if (mGestures != null && mRenderOverlay != null) { return mActivity.superDispatchTouchEvent(m); } else if (mGestures != null && mRenderOverlay != null) { return mGestures.dispatchTouch(m); return mGestures.dispatchTouch(m); } } return false; return false; Loading Loading @@ -382,6 +380,7 @@ public class PhotoUI implements PieListener, LayoutParams.WRAP_CONTENT); LayoutParams.WRAP_CONTENT); lp.gravity = Gravity.CENTER; lp.gravity = Gravity.CENTER; ((FrameLayout) mRootView).addView(mPopup, lp); ((FrameLayout) mRootView).addView(mPopup, lp); mGestures.addTouchReceiver(mPopup); } } public void dismissPopup(boolean topPopupOnly) { public void dismissPopup(boolean topPopupOnly) { Loading @@ -395,6 +394,7 @@ public class PhotoUI implements PieListener, } } setShowMenu(fullScreen); setShowMenu(fullScreen); if (mPopup != null) { if (mPopup != null) { mGestures.removeTouchReceiver(mPopup); ((FrameLayout) mRootView).removeView(mPopup); ((FrameLayout) mRootView).removeView(mPopup); mPopup = null; mPopup = null; } } Loading
src/com/android/camera/PreviewGestures.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -128,6 +128,11 @@ public class PreviewGestures mReceivers.add(v); mReceivers.add(v); } } public void removeTouchReceiver(View v) { if (mReceivers == null || v == null) return; mReceivers.remove(v); } public void addUnclickableArea(View v) { public void addUnclickableArea(View v) { if (mUnclickableAreas == null) { if (mUnclickableAreas == null) { mUnclickableAreas = new ArrayList<View>(); mUnclickableAreas = new ArrayList<View>(); Loading
src/com/android/camera/VideoUI.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -281,6 +281,7 @@ public class VideoUI implements SurfaceHolder.Callback, PieRenderer.PieListener, LayoutParams.WRAP_CONTENT); LayoutParams.WRAP_CONTENT); lp.gravity = Gravity.CENTER; lp.gravity = Gravity.CENTER; ((FrameLayout) mRootView).addView(mPopup, lp); ((FrameLayout) mRootView).addView(mPopup, lp); mGestures.addTouchReceiver(mPopup); } } public void dismissPopup(boolean topLevelOnly) { public void dismissPopup(boolean topLevelOnly) { Loading @@ -294,6 +295,7 @@ public class VideoUI implements SurfaceHolder.Callback, PieRenderer.PieListener, } } setShowMenu(fullScreen); setShowMenu(fullScreen); if (mPopup != null) { if (mPopup != null) { mGestures.removeTouchReceiver(mPopup); ((FrameLayout) mRootView).removeView(mPopup); ((FrameLayout) mRootView).removeView(mPopup); mPopup = null; mPopup = null; } } Loading Loading @@ -472,10 +474,8 @@ public class VideoUI implements SurfaceHolder.Callback, PieRenderer.PieListener, } } public boolean dispatchTouchEvent(MotionEvent m) { public boolean dispatchTouchEvent(MotionEvent m) { if (mPopup == null && mGestures != null && mRenderOverlay != null) { if (mGestures != null && mRenderOverlay != null) { return mGestures.dispatchTouch(m); return mGestures.dispatchTouch(m); } else if (mPopup != null) { return mActivity.superDispatchTouchEvent(m); } } return false; return false; } } Loading