diff options
author | Wu-cheng Li <wuchengli@google.com> | 2011-03-11 12:34:19 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2011-03-14 15:27:01 +0800 |
commit | bcf6200327be0b408426221767467ad2ce132a08 (patch) | |
tree | e74620a0b3b61168f13ea0e7cc3b2acf250eb6dc /src/com/android/camera/Camera.java | |
parent | 26ebb8e98e92599deec34b81623bbcb6213e5544 (diff) | |
download | LegacyCamera-bcf6200327be0b408426221767467ad2ce132a08.zip LegacyCamera-bcf6200327be0b408426221767467ad2ce132a08.tar.gz LegacyCamera-bcf6200327be0b408426221767467ad2ce132a08.tar.bz2 |
Fix image/video capture intents are broken after switching cameras.
The intent action should be kept if it is IMAGE_CAPTURE or
VIDEO_CAPTURE.
This also fixes the bug that video capture will fail after retake.
If the URI is passed in by the intent, it should not be removed
from the content resolver.
bug:4083519
Change-Id: Ia72e399ff8cd5c2a72cc6fe1500ee6922d9a4f5d
Diffstat (limited to 'src/com/android/camera/Camera.java')
-rw-r--r-- | src/com/android/camera/Camera.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 486a712..67ac246 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -2248,7 +2248,13 @@ public class Camera extends ActivityBase implements View.OnClickListener, // Restart the activity to have a crossfade animation. // TODO: Use SurfaceTexture to implement a better and faster // animation. - MenuHelper.gotoCameraMode(this); + if (mIsImageCaptureIntent) { + // If the intent is camera capture, stay in camera capture mode. + MenuHelper.gotoCameraMode(this, getIntent()); + } else { + MenuHelper.gotoCameraMode(this); + } + finish(); } else { setCameraParametersWhenIdle(UPDATE_PARAM_PREFERENCE); |