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

Commit 772f5600 authored by Joe Onorato's avatar Joe Onorato
Browse files

Need to save the brigness setting.

Otherwise the value isn't preserved the next time the screen goes off.

Bug: 3356129
Change-Id: I78fd32ee66a0766ec254b8558d483e97ffdccd7e
parent a032c901
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -79,7 +79,12 @@ public class BrightnessController implements ToggleSlider.Listener {
        setMode(automatic ? Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC
                : Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
        if (!automatic) {
            setBrightness(value + MINIMUM_BACKLIGHT);
            value = value + value + MINIMUM_BACKLIGHT;
            setBrightness(value);
            if (!tracking) {
                Settings.System.putInt(mContext.getContentResolver(),
                        Settings.System.SCREEN_BRIGHTNESS, value);
            }
        }
    }