summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNikola Georgiev <ngeorg@codeaurora.org>2013-09-04 15:30:23 +0300
committerSteve Kondik <shade@chemlab.org>2013-10-18 15:54:50 -0700
commit505a85fa8e8a4b9c8b4fdf851dcfc14349f9ba3d (patch)
tree67a87ddc537aa56607874d2ac7681eb1e8b1f5d2 /src
parentbcd875fd05ac405c17523be170f333da6f9fa6eb (diff)
downloadandroid_packages_apps_Gallery2-505a85fa8e8a4b9c8b4fdf851dcfc14349f9ba3d.tar.gz
android_packages_apps_Gallery2-505a85fa8e8a4b9c8b4fdf851dcfc14349f9ba3d.tar.bz2
android_packages_apps_Gallery2-505a85fa8e8a4b9c8b4fdf851dcfc14349f9ba3d.zip
Camera: Prevent callling of resize before camera is initialized
Prevent callling of resizeForPreviewAspectRatio before camera is initialized Change-Id: If8595cd26f4b0e131aa97f6f1f14b2c98e7a21ad
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/PhotoModule.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 9e691c46d..49beb56db 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -1372,6 +1372,10 @@ public class PhotoModule
}
private void resizeForPreviewAspectRatio() {
+ if ( mCameraDevice == null || mParameters == null) {
+ Log.e(TAG, "Camera not yet initialized");
+ return;
+ }
setPreviewFrameLayoutCameraOrientation();
Size size = mParameters.getPictureSize();
Log.e(TAG,"Width = "+ size.width+ "Height = "+size.height);