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

Commit 41e76e5e authored by petsjonkin's avatar petsjonkin Committed by Android Build Coastguard Worker
Browse files

Moving BrightnessSettings access out of DisplayBrightnessController.mLock

Bug: b/414297026
Test: manual testing
Flag: EXEMPT bugfix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a394205eef979fa92abe439bfc89e0dc6325a50c)
Merged-In: Ifc41e01fbfa2e117fbd583c4fba29a74eac539ae
Change-Id: Ifc41e01fbfa2e117fbd583c4fba29a74eac539ae
parent d28dca00
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -300,8 +300,10 @@ public final class DisplayBrightnessController {
     * Updates pending brightness with value from settings
     */
    public void handleSettingsChange() {
        float brightness = getScreenBrightnessSetting();
        synchronized (mLock) {
            mPendingScreenBrightness = getScreenBrightnessSettingConstrained();
            mPendingScreenBrightness = MathUtils.constrain(
                    brightness, mCurrentMinBrightness, mCurrentMaxBrightness);
        }
    }