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

Commit 7bb22342 authored by Michael Wright's avatar Michael Wright
Browse files

Use correct brightness when manual brightness is enabled.

We want to use whatever the current brightness setting value is, not
whatever the user set last. This means that we'll have a reasonable
value at first boot and we won't get weird brightness jumps when users
disable autobrightness.

Fixes: 72508527
Test: Manual

Change-Id: I4178593f91b231ebcffb6e2104c515e557d975fc
parent 1a5a7061
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -839,11 +839,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
        }

        // Apply manual brightness.
        // Use the current brightness setting from the request, which is expected
        // provide a nominal default value for the case where auto-brightness
        // is not ready yet.
        if (brightness < 0) {
            brightness = clampScreenBrightness(mLastUserSetScreenBrightness);
            brightness = clampScreenBrightness(mCurrentScreenBrightnessSetting);
        }