diff options
author | Pannag Sanketi <psanketi@google.com> | 2011-11-15 16:42:03 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-11-15 16:42:03 -0800 |
commit | a7a6a7822799f6630f127e931ac7f6e1cd3f685e (patch) | |
tree | 68402c3b0322a3ddd7a464cfb8ea91cf00a2c38c /src/com/android/camera/VideoCamera.java | |
parent | f30e0fcdd498713b82f8ad0922baa4a8f030dcd9 (diff) | |
parent | 87e72ba9d89f8b83b1356f17077b9652346a29d4 (diff) | |
download | LegacyCamera-a7a6a7822799f6630f127e931ac7f6e1cd3f685e.zip LegacyCamera-a7a6a7822799f6630f127e931ac7f6e1cd3f685e.tar.gz LegacyCamera-a7a6a7822799f6630f127e931ac7f6e1cd3f685e.tar.bz2 |
Merge "Start Effects Recording only after preview loads" into ics-mr1
Diffstat (limited to 'src/com/android/camera/VideoCamera.java')
-rwxr-xr-x | src/com/android/camera/VideoCamera.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java index 004c36a..1e90544 100755 --- a/src/com/android/camera/VideoCamera.java +++ b/src/com/android/camera/VideoCamera.java @@ -432,6 +432,16 @@ public class VideoCamera extends ActivityBase mShutterButton.setOnShutterButtonListener(this); mShutterButton.requestFocus(); + // Disable the shutter button if effects are ON since it might take + // a little more time for the effects preview to be ready. We do not + // want to allow recording before that happens. The shutter button + // will be enabled when we get the message from effectsrecorder that + // the preview is running. This becomes critical when the camera is + // swapped. + if (effectsActive()) { + mShutterButton.setEnabled(false); + } + mRecordingTimeView = (TextView) findViewById(R.id.recording_time); mRecordingTimeRect = (RotateLayout) findViewById(R.id.recording_time_rect); mOrientationListener = new MyOrientationEventListener(this); @@ -641,6 +651,7 @@ public class VideoCamera extends ActivityBase @Override public void onShutterButtonClick() { if (collapseCameraControls()) return; + boolean stop = mMediaRecorderRecording; if (stop) { @@ -1997,6 +2008,9 @@ public class VideoCamera extends ActivityBase } } mEffectsDisplayResult = false; + } else if (effectMsg == EffectsRecorder.EFFECT_MSG_PREVIEW_RUNNING) { + // Enable the shutter button once the preview is complete. + mShutterButton.setEnabled(true); } else if (effectId == EffectsRecorder.EFFECT_BACKDROPPER) { switch (effectMsg) { case EffectsRecorder.EFFECT_MSG_STARTED_LEARNING: |