summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamera Software Integration <camswint@quicinc.com>2019-11-28 23:47:46 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2019-11-28 23:47:46 -0800
commit24dc44eb458d9a0af7273d7ee30e68253ba67890 (patch)
tree1f539c94f084ffd7a26f9fb8df941269ab9db935
parentaaa8f10a91335e446d0beb3b14048e6eae3fe615 (diff)
parentc4f44d9bf3531b02b57ca69a02e6f0c0d9175905 (diff)
downloadandroid_packages_apps_Snap-24dc44eb458d9a0af7273d7ee30e68253ba67890.zip
android_packages_apps_Snap-24dc44eb458d9a0af7273d7ee30e68253ba67890.tar.gz
android_packages_apps_Snap-24dc44eb458d9a0af7273d7ee30e68253ba67890.tar.bz2
Merge "SnapdraongCamera:Disable HEIF when SelfieMirror" into camera-SnapdragonCamera.lnx.2.0
-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 45878e2..8d7d488 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();
}
@@ -170,6 +176,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
@@ -189,6 +196,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();