summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuK1337 <priv.luk@gmail.com>2019-10-23 20:47:31 +0200
committerMichael Bestas <mkbestas@lineageos.org>2019-11-09 22:47:37 +0200
commit5ac3c216d23cbe070923fac4ee3604c445bf6dc7 (patch)
treedd717c5300283cc7c76ef7eb7ed55a3ff1e8d446
parent496d5e0052fcb85f3c1053fb585b52fa10fdee88 (diff)
downloadandroid_packages_apps_Snap-5ac3c216d23cbe070923fac4ee3604c445bf6dc7.zip
android_packages_apps_Snap-5ac3c216d23cbe070923fac4ee3604c445bf6dc7.tar.gz
android_packages_apps_Snap-5ac3c216d23cbe070923fac4ee3604c445bf6dc7.tar.bz2
Fix NPE when removing RAW setting
* That preference is already gone when developer options are disabled. Change-Id: I040d153561cce691e8e5689bb810585071cb5836
-rwxr-xr-xsrc/com/android/camera/SettingsActivity.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/camera/SettingsActivity.java b/src/com/android/camera/SettingsActivity.java
index 6cdaa55..cdfb9d6 100755
--- a/src/com/android/camera/SettingsActivity.java
+++ b/src/com/android/camera/SettingsActivity.java
@@ -713,7 +713,7 @@ public class SettingsActivity extends PreferenceActivity {
int cameraId = mSettingsManager.getCurrentCameraId();
Size[] rawSize = mSettingsManager.getSupportedOutputSize(cameraId,
ImageFormat.RAW10);
- if (rawSize == null) {
+ if (mDeveloperMenuEnabled && rawSize == null) {
Preference p = findPreference(SettingsManager.KEY_SAVERAW);
p.setEnabled(false);
}