summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSultanxda <sultanxda@gmail.com>2015-09-06 02:16:18 -0700
committerMichael Bestas <mikeioannina@gmail.com>2015-09-19 18:22:17 +0300
commitfa211f76628b56eaa986aa5926e3f8cc8fa39f05 (patch)
tree1b097ca06bb6b25dfe7f3b3e28b253f0d0efcb71
parentb981479d436e0a29f9b24e0a62abc87e9c70dbca (diff)
downloadandroid_packages_apps_Snap-fa211f76628b56eaa986aa5926e3f8cc8fa39f05.zip
android_packages_apps_Snap-fa211f76628b56eaa986aa5926e3f8cc8fa39f05.tar.gz
android_packages_apps_Snap-fa211f76628b56eaa986aa5926e3f8cc8fa39f05.tar.bz2
SnapdragonCamera: Reset camera state after taking picture
mCameraState gets stuck to SNAPSHOT_IN_PROGRESS after taking a picture using autofocus/not ZSL, thus breaking camera capture. Properly reset the camera state after taking a picture to fix this.
-rw-r--r--src/com/android/camera/PhotoModule.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 68a2753..908a0eb 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -2640,6 +2640,11 @@ public class PhotoModule
mErrorCallback.setActivity(mActivity);
mCameraDevice.setErrorCallback(mErrorCallback);
+ // Reset camera state after taking a picture
+ if (mCameraState != PREVIEW_STOPPED && mCameraState != INIT) {
+ setCameraState(IDLE);
+ }
+
// Preview needs to be stopped when changing resolution
if (mRestartPreview && mCameraState != PREVIEW_STOPPED && mCameraState != INIT) {
stopPreview();