From 0f405feacb2fa89d22e9fd8cb982cffad14af4a3 Mon Sep 17 00:00:00 2001 From: Hung-ying Tyan Date: Wed, 15 Dec 2010 12:10:29 +0800 Subject: Fix a NPE in Camera when zoom is changed as the activity is paused. Bug: 3285827 Change-Id: Ib5de58a66586d34226111d1197053801f08e6f8e --- src/com/android/camera/Camera.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 42dee8a..ac74ddc 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -471,6 +471,9 @@ public class Camera extends NoSearchActivity implements View.OnClickListener, } private void onZoomValueChanged(int index) { + // Not useful to change zoom value when the activity is paused. + if (mPausing) return; + if (mSmoothZoomSupported) { if (mTargetZoomValue != index && mZoomState != ZOOM_STOPPED) { mTargetZoomValue = index; -- cgit v1.1