summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2011-10-24 11:03:48 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-10-24 11:03:48 -0700
commit6f311d0bd4bf8dd8df62e656f737a9e369b3db3d (patch)
treebfbd8c0c527323c8b47e55d8b8bd8be24fb53b0f /src/com
parent7ac1bccdef292bf84bf9d7e40d432a466c39663a (diff)
parent07b77037f2f5aa28d6d3188f78588dc7f2d49398 (diff)
downloadLegacyCamera-6f311d0bd4bf8dd8df62e656f737a9e369b3db3d.zip
LegacyCamera-6f311d0bd4bf8dd8df62e656f737a9e369b3db3d.tar.gz
LegacyCamera-6f311d0bd4bf8dd8df62e656f737a9e369b3db3d.tar.bz2
Merge "Add missing state check in EffectsRecorder startup path." into ics-mr0
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/camera/EffectsRecorder.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/com/android/camera/EffectsRecorder.java b/src/com/android/camera/EffectsRecorder.java
index d3b277d..a561011 100644
--- a/src/com/android/camera/EffectsRecorder.java
+++ b/src/com/android/camera/EffectsRecorder.java
@@ -562,8 +562,19 @@ public class EffectsRecorder {
synchronized(EffectsRecorder.this) {
mTextureSource = source;
- if (mState == STATE_RELEASED) return;
-
+ if (mState == STATE_CONFIGURE) {
+ // Stop preview happened while the runner was doing startup tasks
+ // Since we haven't started anything up, don't do anything
+ // Rest of cleanup will happen in onRunnerDone
+ if (mLogVerbose) Log.v(TAG, "Ready callback: Already stopped, skipping.");
+ return;
+ }
+ if (mState == STATE_RELEASED) {
+ // EffectsRecorder has been released, so don't touch the camera device
+ // or anything else
+ if (mLogVerbose) Log.v(TAG, "Ready callback: Already released, skipping.");
+ return;
+ }
if (source == null) {
if (mState == STATE_PREVIEW ||
mState == STATE_STARTING_PREVIEW ||