summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2013-12-03 11:15:08 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-12-03 11:15:08 -0800
commit795812fdf641e133197fbd29f5f55351f7367092 (patch)
treedcd90b67b882b434bfb8f5e481c13b09db76c8dc
parent1e5baa473c233f7b4bd1568d5047c20533e4ce59 (diff)
parent13350e5e46db241b4f6d1ad3f371ac7292c12e65 (diff)
downloadandroid_packages_apps_Snap-795812fdf641e133197fbd29f5f55351f7367092.tar.gz
android_packages_apps_Snap-795812fdf641e133197fbd29f5f55351f7367092.tar.bz2
android_packages_apps_Snap-795812fdf641e133197fbd29f5f55351f7367092.zip
am 13350e5e: Fix WB indicator override
* commit '13350e5e46db241b4f6d1ad3f371ac7292c12e65': Fix WB indicator override
-rw-r--r--src/com/android/camera/PhotoUI.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index 8308e1561..5018c16d6 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -526,12 +526,15 @@ public class PhotoUI implements PieListener,
mOnScreenIndicators.updateExposureOnScreenIndicator(params,
CameraSettings.readExposure(prefs));
mOnScreenIndicators.updateFlashOnScreenIndicator(params.getFlashMode());
- int wbIndex = 2;
+ int wbIndex = -1;
+ String wb = params.getWhiteBalance();
ListPreference pref = group.findPreference(CameraSettings.KEY_WHITE_BALANCE);
if (pref != null) {
- wbIndex = pref.getCurrentIndex();
+ wbIndex = pref.findIndexOfValue(wb);
}
- mOnScreenIndicators.updateWBIndicator(wbIndex);
+ // make sure the correct value was found
+ // otherwise use auto index
+ mOnScreenIndicators.updateWBIndicator(wbIndex < 0 ? 2 : wbIndex);
boolean location = RecordLocationPreference.get(
prefs, mActivity.getContentResolver());
mOnScreenIndicators.updateLocationIndicator(location);