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

Commit 71fa53f8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixed temporary brightness getting stuck bug."

parents 1a5f1abb 3d2c5af8
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -791,9 +791,6 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
                    && mAutomaticBrightnessController != null;

        final boolean userSetBrightnessChanged = updateUserSetScreenBrightness();
        if (userSetBrightnessChanged) {
            mTemporaryScreenBrightness = -1;
        }

        // Use the temporary screen brightness if there isn't an override, either from
        // WindowManager or based on the display state.
@@ -1514,11 +1511,13 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
        }
        if (mCurrentScreenBrightnessSetting == mPendingScreenBrightnessSetting) {
            mPendingScreenBrightnessSetting = -1;
            mTemporaryScreenBrightness = -1;
            return false;
        }
        mCurrentScreenBrightnessSetting = mPendingScreenBrightnessSetting;
        mLastUserSetScreenBrightness = mPendingScreenBrightnessSetting;
        mPendingScreenBrightnessSetting = -1;
        mTemporaryScreenBrightness = -1;
        return true;
    }