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

Commit c1352254 authored by Dan Gittik's avatar Dan Gittik
Browse files

Reset short term model on user switch.

Test: manual.

Change-Id: I96082673094eac111a9f4cf796dcd1e574c33f41
Fixes: 78214953
parent 032ab152
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -316,7 +316,7 @@ class AutomaticBrightnessController {
        return true;
    }

    private void resetShortTermModel() {
    public void resetShortTermModel() {
        mBrightnessMapper.clearUserDataPoints();
        mShortTermModelValid = true;
        mShortTermModelAnchor = -1;
+3 −0
Original line number Diff line number Diff line
@@ -1452,6 +1452,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
        if (userSwitch) {
            // Don't treat user switches as user initiated change.
            mCurrentScreenBrightnessSetting = mPendingScreenBrightnessSetting;
            if (mAutomaticBrightnessController != null) {
                mAutomaticBrightnessController.resetShortTermModel();
            }
        }
        mPendingAutoBrightnessAdjustment = getAutoBrightnessAdjustmentSetting();
        // We don't bother with a pending variable for VR screen brightness since we just