diff options
Diffstat (limited to 'src/com/android/camera/PhotoModule.java')
-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); } } |