diff options
author | Erin Dahlgren <edahlgren@google.com> | 2013-11-07 11:55:49 -0800 |
---|---|---|
committer | Erin Dahlgren <edahlgren@google.com> | 2013-11-07 11:57:30 -0800 |
commit | c5effbada57112445656bf4929f13f9942afb14c (patch) | |
tree | 1f7fbc6c415c72c0f68036cc4efd6eb2ffd414a6 /src/com/android/camera | |
parent | 7e6e947f0e530c14b32785bdb3094ea473000a12 (diff) | |
download | android_packages_apps_Snap-c5effbada57112445656bf4929f13f9942afb14c.tar.gz android_packages_apps_Snap-c5effbada57112445656bf4929f13f9942afb14c.tar.bz2 android_packages_apps_Snap-c5effbada57112445656bf4929f13f9942afb14c.zip |
Fix photo mode is getting stuck in a single CameraState.
Bug: 11574716
Change-Id: Ieb3622103798077071bb9350773851b7acbff756
Diffstat (limited to 'src/com/android/camera')
-rw-r--r-- | src/com/android/camera/PhotoModule.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java index ce0deed54..347244ebe 100644 --- a/src/com/android/camera/PhotoModule.java +++ b/src/com/android/camera/PhotoModule.java @@ -350,7 +350,6 @@ public class PhotoModule } startPreview(); - mHandler.sendEmptyMessage(CAMERA_PREVIEW_DONE); break; } @@ -1566,12 +1565,8 @@ public class PhotoModule startPreview(); } + /** This can run on a background thread, post any view updates to MainHandler. */ private void startPreview() { - if (mCameraState != PREVIEW_STOPPED) { - Log.v(TAG, "Already previewing"); - return; - } - if (mPaused || mCameraDevice == null) { return; } @@ -1592,6 +1587,12 @@ public class PhotoModule return; } mCameraDevice.setErrorCallback(mErrorCallback); + // ICS camera frameworks has a bug. Face detection state is not cleared 1589 + // after taking a picture. Stop the preview to work around it. The bug + // was fixed in JB. + if (mCameraState != PREVIEW_STOPPED) { + stopPreview(); + } setDisplayOrientation(); @@ -1618,6 +1619,7 @@ public class PhotoModule if (mSnapshotOnIdle) { mHandler.post(mDoSnapRunnable); } + mHandler.sendEmptyMessage(CAMERA_PREVIEW_DONE); } } |