diff options
author | ztenghui <ztenghui@google.com> | 2013-10-09 16:15:13 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-10-09 16:15:20 +0000 |
commit | 52beb04d45ff906dfaffb1799a6d93859f1d83bd (patch) | |
tree | 5c84be64b571bf68ae8fe63d05c90cc69972c663 /src/com/android | |
parent | 6939d143cb52a012b1b9cd9a141156357367b212 (diff) | |
parent | dfe5b152788b970944078afc7e57f9d8684571c7 (diff) | |
download | android_packages_apps_Snap-52beb04d45ff906dfaffb1799a6d93859f1d83bd.tar.gz android_packages_apps_Snap-52beb04d45ff906dfaffb1799a6d93859f1d83bd.tar.bz2 android_packages_apps_Snap-52beb04d45ff906dfaffb1799a6d93859f1d83bd.zip |
Merge "Fix NPE in video intent." into gb-ub-photos-carlsbad
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/camera/VideoModule.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 30f435e74..263405eca 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -479,7 +479,12 @@ public class VideoModule implements CameraModule, // 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. - mContentResolver.delete(mCurrentVideoUri, null, null); + // 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) { + mContentResolver.delete(mCurrentVideoUri, null, null); + } doReturnToCaller(false); } |