summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/PreviewGestures.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/PreviewGestures.java')
-rw-r--r--src/com/android/camera/PreviewGestures.java24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/com/android/camera/PreviewGestures.java b/src/com/android/camera/PreviewGestures.java
index 170476e82..4f01fba1b 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;
}
@@ -264,10 +271,6 @@ public class PreviewGestures
return true;
}
- public boolean waitUntilNextDown() {
- return waitUntilNextDown;
- }
-
private MotionEvent makeCancelEvent(MotionEvent m) {
MotionEvent c = MotionEvent.obtain(m);
c.setAction(MotionEvent.ACTION_CANCEL);
@@ -309,5 +312,12 @@ public class PreviewGestures
public void onScaleEnd(ScaleGestureDetector detector) {
mZoom.onScaleEnd(detector);
}
+
+ public boolean onScaleStepResize(boolean direction) {
+ if (mZoom != null) {
+ return mZoom.onScaleStepResize(direction);
+ }
+ return false;
+ }
}