diff options
author | Danesh M <daneshm90@gmail.com> | 2015-10-28 16:28:39 -0700 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2015-10-28 16:45:23 -0700 |
commit | bbef42271cbba0eda91d214186ff2be31eb3b608 (patch) | |
tree | 7e95bff8f80d40d3c5080dd18b50c1678b490fc3 | |
parent | 6397527ca0c430671503cecb69d74554dea1d399 (diff) | |
download | frameworks_base-bbef42271cbba0eda91d214186ff2be31eb3b608.zip frameworks_base-bbef42271cbba0eda91d214186ff2be31eb3b608.tar.gz frameworks_base-bbef42271cbba0eda91d214186ff2be31eb3b608.tar.bz2 |
SystemUI : fix brightness slider for automatic brightness
BRIGHTNESS_ADJ_RESOLUTION was changed to 2048 from 100.
Update the calculation to reflect this change.
Change-Id: I560109e555e3077c7247856e63b017007098ba1f
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 71d3bd1..c74489a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -2541,7 +2541,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, ServiceManager.getService("power")); if (power != null) { if (mAutomaticBrightness) { - float adj = (value * 100) / (BRIGHTNESS_ADJ_RESOLUTION / 2f) - 1; + float adj = (2 * value) - 1; adj = Math.max(adj, -1); adj = Math.min(adj, 1); final float val = adj; |