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

Commit 597ea9a9 authored by Steve Kondik's avatar Steve Kondik
Browse files

CM issue 1496 - don't exceed the maximum brightness value

Patch provided by jsedodge
parent e2ed8f68
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -89,7 +89,8 @@ public class BrightnessPreference extends SeekBarPreference implements

    public void onProgressChanged(SeekBar seekBar, int progress,
            boolean fromTouch) {
        setBrightness(progress + MINIMUM_BACKLIGHT);
        int newBrightness = progress + MINIMUM_BACKLIGHT;
        setBrightness(newBrightness > MAXIMUM_BACKLIGHT ? MAXIMUM_BACKLIGHT : newBrightness);
    }

    public void onStartTrackingTouch(SeekBar seekBar) {