summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-02-16 15:20:48 +0100
committerChristopher N. Hesse <raymanfx@gmail.com>2018-03-06 10:37:55 +0000
commit72869bfe2d4474fe7653877422bfd06bd88fff6d (patch)
tree5b870d55ef9cf80f0fd0f431ede810260e9e25dc
parentff449175d2de9e332279ef38ca4448487336190f (diff)
downloadandroid_packages_apps_Snap-72869bfe2d4474fe7653877422bfd06bd88fff6d.zip
android_packages_apps_Snap-72869bfe2d4474fe7653877422bfd06bd88fff6d.tar.gz
android_packages_apps_Snap-72869bfe2d4474fe7653877422bfd06bd88fff6d.tar.bz2
Do not crash if we don't have support for RAW files
Change-Id: I179e2a430b6ea790d6b4a68b124944e09f4b1715
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 6581b45..3766c82 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -3112,7 +3112,9 @@ public class CaptureModule implements CameraModule, PhotoController,
mSupportedMaxPictureSize = prevSizes[0];
Size[] rawSize = mSettingsManager.getSupportedOutputSize(getMainCameraId(),
ImageFormat.RAW10);
- mSupportedRawPictureSize = rawSize[0];
+ if (rawSize != null) {
+ mSupportedRawPictureSize = rawSize[0];
+ }
mPreviewSize = getOptimalPreviewSize(mPictureSize, prevSizes);
Size[] thumbSizes = mSettingsManager.getSupportedThumbnailSizes(getMainCameraId());
mPictureThumbSize = getOptimalPreviewSize(mPictureSize, thumbSizes); // get largest thumb size