diff options
author | Doris Liu <tianliu@google.com> | 2013-02-21 03:36:46 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-02-21 03:36:46 +0000 |
commit | f11861ff210d0eace106fa4a4385489e8b0b7a32 (patch) | |
tree | 44f899afe1df36b07d20f39d59caba4c80b57f86 | |
parent | d1d32ad29360992e9fad3615e2dda4ab47112aba (diff) | |
parent | 537718ca08c3b65e529f5cf70b3ae65a3263bcc4 (diff) | |
download | android_packages_apps_Snap-f11861ff210d0eace106fa4a4385489e8b0b7a32.tar.gz android_packages_apps_Snap-f11861ff210d0eace106fa4a4385489e8b0b7a32.tar.bz2 android_packages_apps_Snap-f11861ff210d0eace106fa4a4385489e8b0b7a32.zip |
Merge "Fix NPE for when camera is disabled" into gb-ub-photos-bryce
-rw-r--r-- | src/com/android/camera/VideoModule.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 4d01bc320..245ef5990 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -2216,7 +2216,6 @@ public class VideoModule implements CameraModule, initializeMiscControls(); showTimeLapseUI(mCaptureTimeLapse); initializeVideoSnapshot(); - resizeForPreviewAspectRatio(); // from onResume() showVideoSnapshotUI(false); @@ -2279,6 +2278,7 @@ public class VideoModule implements CameraModule, } private void updateOnScreenIndicators() { + if (mParameters == null) return; updateFlashOnScreenIndicator(mParameters.getFlashMode()); } @@ -2436,7 +2436,7 @@ public class VideoModule implements CameraModule, } private void initializeZoom() { - if (!mParameters.isZoomSupported()) return; + if (mParameters == null || !mParameters.isZoomSupported()) return; mZoomMax = mParameters.getMaxZoom(); mZoomRatios = mParameters.getZoomRatios(); // Currently we use immediate zoom for fast zooming to get better UX and @@ -2448,6 +2448,7 @@ public class VideoModule implements CameraModule, } private void initializeVideoSnapshot() { + if (mParameters == null) return; if (Util.isVideoSnapshotSupported(mParameters) && !mIsVideoCaptureIntent) { mActivity.setSingleTapUpListener(mPreviewFrameLayout); // Show the tap to focus toast if this is the first start. @@ -2462,6 +2463,7 @@ public class VideoModule implements CameraModule, } void showVideoSnapshotUI(boolean enabled) { + if (mParameters == null) return; if (Util.isVideoSnapshotSupported(mParameters) && !mIsVideoCaptureIntent) { if (ApiHelper.HAS_SURFACE_TEXTURE && enabled) { ((CameraScreenNail) mActivity.mCameraScreenNail).animateCapture(mDisplayRotation); |