diff options
author | ztenghui <ztenghui@google.com> | 2013-10-09 10:52:33 -0700 |
---|---|---|
committer | ztenghui <ztenghui@google.com> | 2013-10-09 10:52:33 -0700 |
commit | 638bf9ae74f28ce7b6c0b3e6cbe3d6e09b677138 (patch) | |
tree | f0ed55d08d10130c7c30dacf5d8350b139441330 /src | |
parent | dfe5b152788b970944078afc7e57f9d8684571c7 (diff) | |
download | android_packages_apps_Snap-638bf9ae74f28ce7b6c0b3e6cbe3d6e09b677138.tar.gz android_packages_apps_Snap-638bf9ae74f28ce7b6c0b3e6cbe3d6e09b677138.tar.bz2 android_packages_apps_Snap-638bf9ae74f28ce7b6c0b3e6cbe3d6e09b677138.zip |
Fix another potential issue related to video capture intent.
We don't want to delete the Uri sent from the intent.
When we are in review mode, the mCurrentVideoUri should be from the capture
result.
bug:11136978
Change-Id: I148135326e3516936f7d6463941c6b50dbc389db
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/VideoModule.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index af5f18be8..ed2c638d9 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -475,16 +475,17 @@ public class VideoModule implements CameraModule, @Override @OnClickAttr public void onReviewCancelClicked(View v) { - mIsInReviewMode = false; // TODO: It should be better to not even insert the URI at all before we // confirm done in review, which means we need to handle temporary video // files in a quite different way than we currently had. // When the video capture intent doesn't contain the Uri info and the // review is cancelled before taking a video, mCurrentVideoUri can be - // null. - if (mCurrentVideoUri != null) { + // null. Also make sure we don't delete the Uri sent from the video + // capture intent. + if (mIsInReviewMode && mCurrentVideoUri != null) { mContentResolver.delete(mCurrentVideoUri, null, null); } + mIsInReviewMode = false; doReturnToCaller(false); } |