diff options
author | Michael Kolb <kolby@google.com> | 2013-03-14 15:06:51 -0700 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2013-03-14 15:06:51 -0700 |
commit | 7e0ee8bbc790e2eef67f4bbe0cd1c5550d055ea9 (patch) | |
tree | 4a00d67b09e152038a763b821b2424344029ab16 | |
parent | 278fb4714d77bc0f9fe64a774b3a59561d51ad68 (diff) | |
download | android_packages_apps_Snap-7e0ee8bbc790e2eef67f4bbe0cd1c5550d055ea9.tar.gz android_packages_apps_Snap-7e0ee8bbc790e2eef67f4bbe0cd1c5550d055ea9.tar.bz2 android_packages_apps_Snap-7e0ee8bbc790e2eef67f4bbe0cd1c5550d055ea9.zip |
Fix exposure compensation
Bug: 8391082
Change-Id: I346b57dd0c1ed240ab4daa61147c2dd8f8892b44
-rw-r--r-- | src/com/android/camera/CameraSettings.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java index 64f3681de..7c7ed389e 100644 --- a/src/com/android/camera/CameraSettings.java +++ b/src/com/android/camera/CameraSettings.java @@ -235,8 +235,8 @@ public class CameraSettings { private void buildExposureCompensation( PreferenceGroup group, IconListPreference exposure) { - int max = Math.min(3, mParameters.getMaxExposureCompensation()); - int min = Math.max(-3, mParameters.getMinExposureCompensation()); + int max = mParameters.getMaxExposureCompensation(); + int min = mParameters.getMinExposureCompensation(); if (max == 0 && min == 0) { removePreference(group, exposure.getKey()); return; @@ -244,8 +244,8 @@ public class CameraSettings { float step = mParameters.getExposureCompensationStep(); // show only integer values for exposure compensation - int maxValue = (int) FloatMath.floor(max * step); - int minValue = (int) FloatMath.ceil(min * step); + int maxValue = Math.min(3, (int) FloatMath.floor(max * step)); + int minValue = Math.max(-3, (int) FloatMath.ceil(min * step)); CharSequence entries[] = new CharSequence[maxValue - minValue + 1]; CharSequence entryValues[] = new CharSequence[maxValue - minValue + 1]; int[] icons = new int[maxValue - minValue + 1]; |