Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbef4227 authored by Danesh M's avatar Danesh M
Browse files

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
parent 6397527c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;