summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2011-10-27 10:35:21 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-10-27 10:35:21 -0700
commita5a767ce09ee46f4b14ff797fab8a84d95dd862d (patch)
tree3be8f970a60e4b3a15c0778f01dae8313f453230 /src/com/android
parent2dd7aed46972c12375bb420b00d267c44ca1e915 (diff)
parentb11ee09d99c9a817eade2ee502a0ff4727f15c8f (diff)
downloadLegacyCamera-a5a767ce09ee46f4b14ff797fab8a84d95dd862d.zip
LegacyCamera-a5a767ce09ee46f4b14ff797fab8a84d95dd862d.tar.gz
LegacyCamera-a5a767ce09ee46f4b14ff797fab8a84d95dd862d.tar.bz2
Merge "Fix video capture intent preview alert for effects." into ics-mr1
Diffstat (limited to 'src/com/android')
-rwxr-xr-xsrc/com/android/camera/VideoCamera.java28
1 files changed, 22 insertions, 6 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index ba189ca..7c87892 100755
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -179,6 +179,7 @@ public class VideoCamera extends ActivityBase
private MediaRecorder mMediaRecorder;
private EffectsRecorder mEffectsRecorder;
+ private boolean mEffectsDisplayResult;
private int mEffectType = EffectsRecorder.EFFECT_NONE;
private Object mEffectParameter = null;
@@ -602,14 +603,15 @@ public class VideoCamera extends ActivityBase
}
private void onStopVideoRecording(boolean valid) {
+ mEffectsDisplayResult = true;
stopVideoRecording();
if (mIsVideoCaptureIntent) {
if (mQuickCapture) {
doReturnToCaller(valid);
- } else {
+ } else if (!effectsActive()) {
showAlert();
}
- } else {
+ } else if (!effectsActive()) {
getThumbnail();
}
}
@@ -926,12 +928,13 @@ public class VideoCamera extends ActivityBase
// This is similar to what mShutterButton.performClick() does,
// but not quite the same.
if (mMediaRecorderRecording) {
+ mEffectsDisplayResult = true;
if (mIsVideoCaptureIntent) {
stopVideoRecording();
- showAlert();
+ if (!effectsActive()) showAlert();
} else {
stopVideoRecording();
- getThumbnail();
+ if (!effectsActive()) getThumbnail();
}
} else {
stopVideoRecording();
@@ -1241,6 +1244,7 @@ public class VideoCamera extends ActivityBase
CameraInfo info = CameraHolder.instance().getCameraInfo()[mCameraId];
+ mEffectsDisplayResult = false;
mEffectsRecorder = new EffectsRecorder(this);
// TODO: Confirm none of the foll need to go to initializeEffectsRecording()
@@ -1952,8 +1956,20 @@ public class VideoCamera extends ActivityBase
mBgLearningMessageFrame.setVisibility(View.GONE);
checkQualityAndStartPreview();
} else if (effectMsg == EffectsRecorder.EFFECT_MSG_RECORDING_DONE) {
- addVideoToMediaStore();
- getThumbnail();
+ // TODO: This assumes the codepath from onStopVideoRecording. It
+ // does not appear to cause problems for the other codepaths, but
+ // should be properly thought through.
+ if (mEffectsDisplayResult) {
+ addVideoToMediaStore();
+ if (mIsVideoCaptureIntent) {
+ if (!mQuickCapture) {
+ showAlert();
+ }
+ } else {
+ getThumbnail();
+ }
+ }
+ mEffectsDisplayResult = false;
} else if (effectId == EffectsRecorder.EFFECT_BACKDROPPER) {
switch (effectMsg) {
case EffectsRecorder.EFFECT_MSG_STARTED_LEARNING: