summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2010-03-18 18:30:02 -0700
committerWu-cheng Li <wuchengli@google.com>2010-03-18 20:48:01 -0700
commitd5394c4c526a08b71d29ac1a09ffcf0e54de9caa (patch)
tree8ad3da4f367494b51f8c836ce1250fa16f30ddc9
parentfce06cd38c8886204981478ce505a32de2127c24 (diff)
downloadpackages_apps_LegacyCamera-d5394c4c526a08b71d29ac1a09ffcf0e54de9caa.zip
packages_apps_LegacyCamera-d5394c4c526a08b71d29ac1a09ffcf0e54de9caa.tar.gz
packages_apps_LegacyCamera-d5394c4c526a08b71d29ac1a09ffcf0e54de9caa.tar.bz2
Get the parameters before reading maximum zoom.
bug:2458926 Change-Id: Ie987df3ecfddc5582b101b4ead267dc2dbd7cc23
-rw-r--r--src/com/android/camera/Camera.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index e0acec5..df5c29c 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -405,6 +405,9 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
private void initializeZoom() {
if (!mParameters.isZoomSupported()) return;
+ // Maximum zoom value may change after preview size is set. Get the
+ // latest parameters here.
+ mParameters = mCameraDevice.getParameters();
mZoomMax = mParameters.getMaxZoom();
mSmoothZoomSupported = mParameters.isSmoothZoomSupported();
mGestureDetector = new GestureDetector(this, new ZoomGestureListener());