diff options
author | ztenghui <ztenghui@google.com> | 2013-10-08 17:07:15 -0700 |
---|---|---|
committer | ztenghui <ztenghui@google.com> | 2013-10-08 17:49:05 -0700 |
commit | dfe5b152788b970944078afc7e57f9d8684571c7 (patch) | |
tree | 7ed4946545367f1419688086d7f15252257998e8 /src | |
parent | 06578b59bf15c1ac35dbbffd979f40479b1cbda9 (diff) | |
download | android_packages_apps_Snap-dfe5b152788b970944078afc7e57f9d8684571c7.tar.gz android_packages_apps_Snap-dfe5b152788b970944078afc7e57f9d8684571c7.tar.bz2 android_packages_apps_Snap-dfe5b152788b970944078afc7e57f9d8684571c7.zip |
Fix NPE in video intent.
bug:11136978
Change-Id: I6076581131e3dcdc456d8ac8865a5cc6f84e9da4
Diffstat (limited to 'src')
-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 dc04c8017..af5f18be8 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); } |