summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWang Han <416810799@qq.com>2018-11-15 14:34:33 +0800
committerdianlujitao <dianlujitao@lineageos.org>2018-12-19 14:00:02 +0800
commit0d811bdc2f96cd82f8062d27d1589b76e94e72d5 (patch)
treefff3ef40500cc327ee8310461766d93224184230
parent814db6fddccfb06cd9a648144f2eb02f90a6bcac (diff)
downloadandroid_packages_apps_Snap-0d811bdc2f96cd82f8062d27d1589b76e94e72d5.zip
android_packages_apps_Snap-0d811bdc2f96cd82f8062d27d1589b76e94e72d5.tar.gz
android_packages_apps_Snap-0d811bdc2f96cd82f8062d27d1589b76e94e72d5.tar.bz2
Snap: Add missing NULL check in updateQcfaPictureSize()
* Fixes crash when enabling Qcfa Change-Id: I506a1d7da0b91bc48484bd251e0c6c9042962421
-rwxr-xr-xsrc/com/android/camera/SettingsManager.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/camera/SettingsManager.java b/src/com/android/camera/SettingsManager.java
index 7bf637d..5170465 100755
--- a/src/com/android/camera/SettingsManager.java
+++ b/src/com/android/camera/SettingsManager.java
@@ -328,10 +328,12 @@ public class SettingsManager implements ListMenu.SettingsListener {
}
public void updateQcfaPictureSize() {
- ListPreference pictureSize = mPreferenceGroup.findPreference(KEY_PICTURE_SIZE);
+ ListPreference pictureSize = mPreferenceGroup.findPreference(KEY_PICTURE_SIZE);
+ if (pictureSize != null) {
CameraSettings.formatPictureSizes(pictureSize,
getSupportedPictureSizeList(getCurrentCameraId()), mContext);
CameraSettings.resetIfInvalid(pictureSize);
+ }
}
public void init() {