summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Coucheron <arco68@gmail.com>2017-08-06 08:33:24 +0200
committerArne Coucheron <arco68@gmail.com>2018-01-27 00:41:44 +0100
commit6c89e7d0c8491c8927e64c24dc272e8ec130f44c (patch)
tree28077fefe0f92430a4c850790ed10497597284fb
parentd237cabdcfebdfeae37ca1d0703e331e24d32406 (diff)
downloadandroid_packages_apps_Snap-6c89e7d0c8491c8927e64c24dc272e8ec130f44c.zip
android_packages_apps_Snap-6c89e7d0c8491c8927e64c24dc272e8ec130f44c.tar.gz
android_packages_apps_Snap-6c89e7d0c8491c8927e64c24dc272e8ec130f44c.tar.bz2
Snap: Fix swipe right to open menu
Change-Id: I74b9230e7c63813b3e8b716acf66b10c835f12b5
-rw-r--r--src/com/android/camera/PreviewGestures.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/com/android/camera/PreviewGestures.java b/src/com/android/camera/PreviewGestures.java
index 81177ba..5d3547d 100644
--- a/src/com/android/camera/PreviewGestures.java
+++ b/src/com/android/camera/PreviewGestures.java
@@ -88,17 +88,24 @@ public class PreviewGestures
return false;
}
if (mZoomOnly || mMode == MODE_ZOOM) return false;
-
int deltaX = (int) (e1.getX() - e2.getX());
int deltaY = (int) (e1.getY() - e2.getY());
int orientation = 0;
- if (mCaptureUI != null)
+ if (mPhotoMenu != null)
+ orientation = mPhotoMenu.getOrientation();
+ else if (mVideoMenu != null)
+ orientation = mVideoMenu.getOrientation();
+ else if (mCaptureUI != null)
orientation = mCaptureUI.getOrientation();
if (isLeftSwipe(orientation, deltaX, deltaY)) {
waitUntilNextDown = true;
- if (mCaptureUI != null)
+ if (mPhotoMenu != null && !mPhotoMenu.isMenuBeingShown())
+ mPhotoMenu.openFirstLevel();
+ else if (mVideoMenu != null && !mVideoMenu.isMenuBeingShown())
+ mVideoMenu.openFirstLevel();
+ else if (mCaptureUI != null)
mCaptureUI.openSettingsMenu();
return true;
}