summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWei Huang <weih@google.com>2011-09-23 08:29:23 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-09-23 08:29:23 -0700
commit70c9730d0cbdcd64d29928f8de293c6c753deba7 (patch)
tree37205d781fdb91135cdda7abf7891cb750cfcfc9 /src
parent022d6d7e809fcd47ebc751deaea84e2d3639069a (diff)
parentfe45771b64882d2c025e09cb5937772fa47fb345 (diff)
downloadLegacyCamera-70c9730d0cbdcd64d29928f8de293c6c753deba7.zip
LegacyCamera-70c9730d0cbdcd64d29928f8de293c6c753deba7.tar.gz
LegacyCamera-70c9730d0cbdcd64d29928f8de293c6c753deba7.tar.bz2
Merge "Clear zoom listener and error callback when leaving." into ics-factoryrom
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/Camera.java1
-rw-r--r--src/com/android/camera/VideoCamera.java4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 2992e95..ed8ef5e 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -1492,6 +1492,7 @@ public class Camera extends ActivityBase implements FocusManager.Listener,
CameraHolder.instance().release();
mCameraDevice.setZoomChangeListener(null);
mCameraDevice.setFaceDetectionListener(null);
+ mCameraDevice.setErrorCallback(null);
mCameraDevice = null;
mCameraState = PREVIEW_STOPPED;
mFocusManager.onCameraReleased();
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index 8b6c328..d33b7fc 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -914,6 +914,8 @@ public class VideoCamera extends ActivityBase
}
mEffectType = EffectsRecorder.EFFECT_NONE;
CameraHolder.instance().release();
+ mCameraDevice.setZoomChangeListener(null);
+ mCameraDevice.setErrorCallback(null);
mCameraDevice = null;
mPreviewing = false;
mSnapshotInProgress = false;
@@ -2114,7 +2116,7 @@ public class VideoCamera extends ActivityBase
mZoomControl.setZoomMax(mZoomMax);
mZoomControl.setZoomIndex(mParameters.getZoom());
mZoomControl.setSmoothZoomSupported(mSmoothZoomSupported);
- mZoomControl.setOnZoomChangeListener(new ZoomChangeListener() );
+ mZoomControl.setOnZoomChangeListener(new ZoomChangeListener());
mCameraDevice.setZoomChangeListener(mZoomListener);
}