diff options
author | Pannag Sanketi <psanketi@google.com> | 2011-11-14 21:48:17 -0800 |
---|---|---|
committer | Pannag Sanketi <psanketi@google.com> | 2011-11-15 13:25:11 -0800 |
commit | 87e72ba9d89f8b83b1356f17077b9652346a29d4 (patch) | |
tree | 344aa57a41727486f3b44423e22e6f7f9dcaddf1 /src/com/android/camera/EffectsRecorder.java | |
parent | 34238165cfdf04584587360dfcf21109bf09e144 (diff) | |
download | LegacyCamera-87e72ba9d89f8b83b1356f17077b9652346a29d4.zip LegacyCamera-87e72ba9d89f8b83b1356f17077b9652346a29d4.tar.gz LegacyCamera-87e72ba9d89f8b83b1356f17077b9652346a29d4.tar.bz2 |
Start Effects Recording only after preview loads
Start Effects Recording only after we get SurfaceTexture Callback in
EffectsRecorder, and
hence preview loaded. Disable the shutter button on creation, and
re-enable it on the preview callback. Else, one could potentially start
the recording before the preview loads, leading to a wrong state
information and an eventual crash.
Related Bugs: 5605173, 5605658
Change-Id: I2ed766997294c165ce6c262cf47f124493d0c5ec
Diffstat (limited to 'src/com/android/camera/EffectsRecorder.java')
-rw-r--r-- | src/com/android/camera/EffectsRecorder.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/camera/EffectsRecorder.java b/src/com/android/camera/EffectsRecorder.java index 737e828..8470038 100644 --- a/src/com/android/camera/EffectsRecorder.java +++ b/src/com/android/camera/EffectsRecorder.java @@ -73,6 +73,7 @@ public class EffectsRecorder { public static final int EFFECT_MSG_SWITCHING_EFFECT = 2; public static final int EFFECT_MSG_EFFECTS_STOPPED = 3; public static final int EFFECT_MSG_RECORDING_DONE = 4; + public static final int EFFECT_MSG_PREVIEW_RUNNING = 5; private Context mContext; private Handler mHandler; @@ -634,6 +635,9 @@ public class EffectsRecorder { mState = STATE_PREVIEW; if (mLogVerbose) Log.v(TAG, "Start preview/effect switch complete"); + + // Sending a message to listener that preview is complete + sendMessage(mCurrentEffect, EFFECT_MSG_PREVIEW_RUNNING); } } }; |