diff options
author | Doris Liu <tianliu@google.com> | 2013-08-12 15:18:53 -0700 |
---|---|---|
committer | Doris Liu <tianliu@google.com> | 2013-08-13 11:22:27 -0700 |
commit | 2a7f44cac888de5683d05bef5708f846ee950f43 (patch) | |
tree | a7cb316a8a385be64c08b0ff9ffcf64fab1281e5 /src/com/android/camera/CameraActivity.java | |
parent | 39685480a9705a949275c4b9cb0cca46c6c3cbc4 (diff) | |
download | android_packages_apps_Snap-2a7f44cac888de5683d05bef5708f846ee950f43.tar.gz android_packages_apps_Snap-2a7f44cac888de5683d05bef5708f846ee950f43.tar.bz2 android_packages_apps_Snap-2a7f44cac888de5683d05bef5708f846ee950f43.zip |
Fix video capture intent handling
Bug: 10296343
Change-Id: I55fb6c71b59a1559ebb58c65e71d510379367435
Diffstat (limited to 'src/com/android/camera/CameraActivity.java')
-rw-r--r-- | src/com/android/camera/CameraActivity.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java index 9ffebc2a6..c1b04683a 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -32,6 +32,7 @@ import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; +import android.provider.MediaStore; import android.provider.Settings; import android.util.Log; import android.view.KeyEvent; @@ -386,7 +387,13 @@ public class CameraActivity extends Activity mFilmStripView.setPanoramaViewHelper(mPanoramaViewHelper); // Set up the camera preview first so the preview shows up ASAP. mFilmStripView.setListener(mFilmStripListener); - mCurrentModule = new PhotoModule(); + if (MediaStore.INTENT_ACTION_VIDEO_CAMERA.equals(getIntent().getAction()) + || MediaStore.ACTION_VIDEO_CAPTURE.equals(getIntent().getAction())) { + mCurrentModule = new VideoModule(); + mCurrentModuleIndex = CameraSwitcher.VIDEO_MODULE_INDEX; + } else { + mCurrentModule = new PhotoModule(); + } mCurrentModule.init(this, mRootView); mOrientationListener = new MyOrientationEventListener(this); mMainHandler = new Handler(getMainLooper()); |