diff options
author | Wu-cheng Li <wuchengli@google.com> | 2010-11-30 22:49:07 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-11-30 22:49:07 -0800 |
commit | 266c04b7de53dffe416d5c967edb9f22fd3a8814 (patch) | |
tree | 74868f20e1ac32ee70614b00bdbae7dc1115d9b6 /src | |
parent | b6be7b78d2645c6e5a377b4d118ccaf28c6b10a2 (diff) | |
parent | dfc4793ddd07b8a80cdc9989afba006582443a01 (diff) | |
download | LegacyCamera-266c04b7de53dffe416d5c967edb9f22fd3a8814.zip LegacyCamera-266c04b7de53dffe416d5c967edb9f22fd3a8814.tar.gz LegacyCamera-266c04b7de53dffe416d5c967edb9f22fd3a8814.tar.bz2 |
Merge "Remove double tap to zoom."
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/Camera.java | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 344fc47..8691e9a 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -159,7 +159,6 @@ public class Camera extends NoSearchActivity implements View.OnClickListener, private FocusRectangle mFocusRectangle; private ToneGenerator mFocusToneGenerator; private GestureDetector mPopupGestureDetector; - private GestureDetector mZoomGestureDetector; private SwitcherSet mSwitcher; private boolean mStartPreviewFail = false; @@ -450,7 +449,6 @@ public class Camera extends NoSearchActivity implements View.OnClickListener, mZoomMax = mParameters.getMaxZoom(); mSmoothZoomSupported = mParameters.isSmoothZoomSupported(); - mZoomGestureDetector = new GestureDetector(this, new ZoomGestureListener()); if (mZoomPicker != null) { mZoomPicker.setZoomRatios(getZoomRatios()); mZoomPicker.setOnZoomChangeListener( @@ -493,43 +491,6 @@ public class Camera extends NoSearchActivity implements View.OnClickListener, return result; } - private class ZoomGestureListener extends - GestureDetector.SimpleOnGestureListener { - - @Override - public boolean onDoubleTap(MotionEvent e) { - // Perform zoom only when preview is started and snapshot is not in - // progress. - if (mPausing || !isCameraIdle() || !mPreviewing - || mZoomState != ZOOM_STOPPED) { - return false; - } - - int x = Math.round(e.getX()); - int y = Math.round(e.getY()); - if (x < mSurfaceView.getLeft() || x > mSurfaceView.getRight() - || y < mSurfaceView.getTop() || y > mSurfaceView.getBottom()) { - return false; - } - - if (mZoomValue < mZoomMax) { - // Zoom in to the maximum. - mZoomValue = mZoomMax; - } else { - mZoomValue = 0; - } - - setCameraParametersWhenIdle(UPDATE_PARAM_ZOOM); - - if (mZoomPicker != null) { - mZoomPicker.setZoomIndex(mZoomValue); - } else { - mHeadUpDisplay.setZoomIndex(mZoomValue); - } - return true; - } - } - private int mPopupLocations[] = new int[2]; private class PopupGestureListener extends GestureDetector.SimpleOnGestureListener { @@ -559,11 +520,7 @@ public class Camera extends NoSearchActivity implements View.OnClickListener, return true; } - if (!super.dispatchTouchEvent(m) && mZoomGestureDetector != null) { - return mZoomGestureDetector.onTouchEvent(m); - } - - return false; + return super.dispatchTouchEvent(m); } LocationListener [] mLocationListeners = new LocationListener[] { |