summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/PhotoModule.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/PhotoModule.java')
-rw-r--r--src/com/android/camera/PhotoModule.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index ef9c91f54..c4434bd1a 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -230,6 +230,7 @@ public class PhotoModule
private int SCE_FACTOR_STEP = 10;
private boolean mPreviewRestartSupport = false;
+ private boolean mPreviewStarting = false;
// mCropValue and mSaveUri are used only if isImageCaptureIntent() is true.
private String mCropValue;
@@ -2957,11 +2958,12 @@ public class PhotoModule
/** This can run on a background thread, so don't do UI updates here. Post any
view updates to MainHandler or do it on onPreviewStarted() . */
private void startPreview() {
- if (mPaused || mCameraDevice == null || mParameters == null) {
+ if (mPaused || mCameraDevice == null || mParameters == null || mPreviewStarting) {
return;
}
synchronized (mCameraDevice) {
+ mPreviewStarting = true;
SurfaceHolder sh = null;
Log.v(TAG, "startPreview: SurfaceHolder (MDP path)");
if (mUI != null) {
@@ -3021,6 +3023,7 @@ public class PhotoModule
Log.v(TAG, "Trigger snapshot from start preview.");
mHandler.post(mDoSnapRunnable);
}
+ mPreviewStarting = false;
}
@Override