summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2013-10-09 09:18:08 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-09 09:18:08 -0700
commit676b89cab6e9db1b784617fc16e97eadac7c4e2d (patch)
tree7935197cc6a63d2ff25c9f0fcf11e458b50980e6
parent59f24eeb714d75658f98123928f872fe65cab0a1 (diff)
parent52beb04d45ff906dfaffb1799a6d93859f1d83bd (diff)
downloadandroid_packages_apps_Snap-676b89cab6e9db1b784617fc16e97eadac7c4e2d.tar.gz
android_packages_apps_Snap-676b89cab6e9db1b784617fc16e97eadac7c4e2d.tar.bz2
android_packages_apps_Snap-676b89cab6e9db1b784617fc16e97eadac7c4e2d.zip
am 52beb04d: Merge "Fix NPE in video intent." into gb-ub-photos-carlsbad
* commit '52beb04d45ff906dfaffb1799a6d93859f1d83bd': Fix NPE in video intent.
-rw-r--r--src/com/android/camera/VideoModule.java7
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);
}