summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-05-29 01:30:28 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2019-05-29 01:30:29 -0700
commit55362e29caacd9f8271e5242310023697c4896af (patch)
tree63295f48a078a11fe505cb9f08c936ffc80c57c4
parent4d78ecad74b5f74f34c82ac83ff712887d41fc09 (diff)
parent975670ceb33c735693f567f06b9e8b9c5f64faa6 (diff)
downloadandroid_packages_apps_Snap-55362e29caacd9f8271e5242310023697c4896af.tar.gz
android_packages_apps_Snap-55362e29caacd9f8271e5242310023697c4896af.tar.bz2
android_packages_apps_Snap-55362e29caacd9f8271e5242310023697c4896af.zip
Merge changes Ia6047e64,I81d9b2d1 into camera-SnapdragonCamera.lnx.2.0
* changes: fix confilct on HFR and Time Lapse option fix apply wrong earlyPCR value after HFR
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java1
-rwxr-xr-xsrc/com/android/camera/SettingsActivity.java37
2 files changed, 28 insertions, 10 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index a06acf84f..ceb7fbf5c 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -5317,6 +5317,7 @@ public class CaptureModule implements CameraModule, PhotoController,
closePreviewSession();
}
mMediaRecorderStarted = false;
+ mHighSpeedCapture = false;
try {
mMediaRecorder.setOnErrorListener(null);
mMediaRecorder.setOnInfoListener(null);
diff --git a/src/com/android/camera/SettingsActivity.java b/src/com/android/camera/SettingsActivity.java
index fc4bb339a..ae7b48293 100755
--- a/src/com/android/camera/SettingsActivity.java
+++ b/src/com/android/camera/SettingsActivity.java
@@ -146,16 +146,14 @@ public class SettingsActivity extends PreferenceActivity {
}
if ( pref.getKey().equals(SettingsManager.KEY_VIDEO_HDR_VALUE) ) {
- ListPreference autoHdrPref = (ListPreference) findPreference(
- mSettingsManager.KEY_AUTO_HDR);
- if (pref.getSummary().equals("enable")) {
- // when enable the Video HDR, app will disable the AUTO HDR.
- autoHdrPref.setEnabled(false);
- autoHdrPref.setValue("disable");
- mSettingsManager.setValue(mSettingsManager.KEY_AUTO_HDR, "disable");
- } else {
- autoHdrPref.setEnabled(true);
- }
+ // when enable the Video HDR, app will disable the AUTO HDR.
+ updateConflictOptionState(SettingsManager.KEY_AUTO_HDR, pref,
+ "Disable", "disable");
+ }
+
+ if (pref.getKey().equals(SettingsManager.KEY_VIDEO_HIGH_FRAME_RATE)) {
+ updateConflictOptionState(SettingsManager.KEY_VIDEO_TIME_LAPSE_FRAME_INTERVAL,
+ pref, "Off", "0");
}
if ( (pref.getKey().equals(SettingsManager.KEY_MANUAL_WB)) ) {
@@ -165,6 +163,25 @@ 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
+ * @param changedPref preference of setting which is just changed
+ * @param checkedValue Judgement condition of enable or disable. It is Entry not EntryValue
+ * @param targetValue EntryValue you want to set into conflictKey when you disable it
+ */
+ private void updateConflictOptionState(String conflictKey, Preference changedPref,
+ String checkedValue, String targetValue) {
+ ListPreference conflictPref = (ListPreference) findPreference(conflictKey);
+ if (!changedPref.getSummary().equals(checkedValue)) {
+ conflictPref.setValue(targetValue);
+ mSettingsManager.setValue(conflictKey, targetValue);
+ conflictPref.setEnabled(false);
+ } else {
+ conflictPref.setEnabled(true);
+ }
+ }
+
private void UpdateManualExposureSettings() {
//dismiss all popups first, because we need to show edit dialog
int cameraId = mSettingsManager.getCurrentCameraId();