Don't treat user switch as a brightness slider interaction
Bug: 183214790 Test: atest com.android.server.display Change-Id: I637c2106ae2ff5b8ec35ebffcccf44cef8768655
This commit is contained in:
@@ -1313,9 +1313,6 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
||||
}
|
||||
|
||||
final boolean autoBrightnessAdjustmentChanged = updateAutoBrightnessAdjustment();
|
||||
if (autoBrightnessAdjustmentChanged) {
|
||||
mTemporaryAutoBrightnessAdjustment = Float.NaN;
|
||||
}
|
||||
|
||||
// Use the autobrightness adjustment override if set.
|
||||
final float autoBrightnessAdjustment;
|
||||
@@ -2290,14 +2287,15 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
||||
|
||||
private void handleSettingsChange(boolean userSwitch) {
|
||||
mPendingScreenBrightnessSetting = getScreenBrightnessSetting();
|
||||
mPendingAutoBrightnessAdjustment = getAutoBrightnessAdjustmentSetting();
|
||||
if (userSwitch) {
|
||||
// Don't treat user switches as user initiated change.
|
||||
setCurrentScreenBrightness(mPendingScreenBrightnessSetting);
|
||||
updateAutoBrightnessAdjustment();
|
||||
if (mAutomaticBrightnessController != null) {
|
||||
mAutomaticBrightnessController.resetShortTermModel();
|
||||
}
|
||||
}
|
||||
mPendingAutoBrightnessAdjustment = getAutoBrightnessAdjustmentSetting();
|
||||
// We don't bother with a pending variable for VR screen brightness since we just
|
||||
// immediately adapt to it.
|
||||
mScreenBrightnessForVr = getScreenBrightnessForVrSetting();
|
||||
@@ -2366,6 +2364,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
||||
}
|
||||
mAutoBrightnessAdjustment = mPendingAutoBrightnessAdjustment;
|
||||
mPendingAutoBrightnessAdjustment = Float.NaN;
|
||||
mTemporaryAutoBrightnessAdjustment = Float.NaN;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user