summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWang Han <416810799@qq.com>2018-11-14 15:48:09 +0800
committerdianlujitao <dianlujitao@lineageos.org>2018-12-19 14:00:02 +0800
commit87df5d2c259c483f3102ba4084d03dd87614995d (patch)
tree74de98f5921274fb90d558a6dc81d2013d687c10
parent47a216dc8877fde1ddab3685d71425b065beaeba (diff)
downloadandroid_packages_apps_Snap-87df5d2c259c483f3102ba4084d03dd87614995d.tar.gz
android_packages_apps_Snap-87df5d2c259c483f3102ba4084d03dd87614995d.tar.bz2
android_packages_apps_Snap-87df5d2c259c483f3102ba4084d03dd87614995d.zip
Snap: Avoid crash with empty RAW output size
* Check for length of rawSize, fixes front camera on oneplus2 Change-Id: I3640fde2e6649c715c26cf366d2b71679b59a83c
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index d1d9183c7..aa5fb17c2 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -3780,7 +3780,7 @@ public class CaptureModule implements CameraModule, PhotoController,
mSupportedMaxPictureSize = prevSizes[0];
Size[] rawSize = mSettingsManager.getSupportedOutputSize(getMainCameraId(),
ImageFormat.RAW10);
- if (rawSize != null) {
+ if (rawSize != null && rawSize.length > 0) {
mSupportedRawPictureSize = rawSize[0];
}
mPreviewSize = getOptimalPreviewSize(mPictureSize, prevSizes);