summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjunjiez <junjiez@codeaurora.org>2019-10-10 15:18:51 +0800
committerjunjiez <junjiez@codeaurora.org>2019-11-11 16:57:51 +0800
commitc4f44d9bf3531b02b57ca69a02e6f0c0d9175905 (patch)
tree926576813d68fd03508094f70dd5600530b231cd
parentf3b7cacf2b53b3239fc29ffddc2028be6dba89a2 (diff)
downloadandroid_packages_apps_Snap-c4f44d9bf3531b02b57ca69a02e6f0c0d9175905.zip
android_packages_apps_Snap-c4f44d9bf3531b02b57ca69a02e6f0c0d9175905.tar.gz
android_packages_apps_Snap-c4f44d9bf3531b02b57ca69a02e6f0c0d9175905.tar.bz2
SnapdraongCamera:Disable HEIF when SelfieMirror
SelfieMirror need to use app-zsl,but app-zsl is not supported,so disable heif when SelfieMirror is enabled. Change-Id: I31a5e482a73716521dd3bacd637db4df119a508d CRs-Fixed: 2534960
-rwxr-xr-xsrc/com/android/camera/SettingsActivity.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/com/android/camera/SettingsActivity.java b/src/com/android/camera/SettingsActivity.java
index 3fef924..ffdb1a5 100755
--- a/src/com/android/camera/SettingsActivity.java
+++ b/src/com/android/camera/SettingsActivity.java
@@ -156,6 +156,12 @@ public class SettingsActivity extends PreferenceActivity {
pref, "Off", "0");
}
+ if ((pref.getKey().equals(SettingsManager.KEY_ZSL) ||
+ pref.getKey().equals(SettingsManager.KEY_PICTURE_FORMAT)) ||
+ pref.getKey().equals(SettingsManager.KEY_SELFIEMIRROR)) {
+ updateFormatPreference();
+ }
+
if ( (pref.getKey().equals(SettingsManager.KEY_MANUAL_WB)) ) {
updateManualWBSettings();
}
@@ -169,6 +175,7 @@ public class SettingsActivity extends PreferenceActivity {
}
};
+
/**
* This method is to enable or disable the option which is conflict with changed setting
* @param conflictKey key you want to change after setting is changed
@@ -188,6 +195,29 @@ public class SettingsActivity extends PreferenceActivity {
}
}
+ private void updateFormatPreference() {
+ ListPreference formatPref = (ListPreference)findPreference(SettingsManager.KEY_PICTURE_FORMAT);
+ ListPreference ZSLPref = (ListPreference) findPreference(SettingsManager.KEY_ZSL);
+ ListPreference mfnrPref = (ListPreference) findPreference(SettingsManager.KEY_CAPTURE_MFNR_VALUE);
+ SwitchPreference selfiePref = (SwitchPreference) findPreference(SettingsManager.KEY_SELFIEMIRROR);
+ if (formatPref == null) {
+ return;
+ }
+ if((ZSLPref != null && "app-zsl".equals(ZSLPref.getValue())) ||
+ (selfiePref != null && selfiePref.isChecked())){
+ formatPref.setValue("0");
+ formatPref.setEnabled(false);
+ if (mfnrPref != null) {
+ mfnrPref.setEnabled(false);
+ }
+ } else {
+ formatPref.setEnabled(true);
+ if (mfnrPref != null) {
+ mfnrPref.setEnabled(true);
+ }
+ }
+ }
+
private void UpdateManualExposureSettings() {
//dismiss all popups first, because we need to show edit dialog
int cameraId = mSettingsManager.getCurrentCameraId();