Loading services/core/java/com/android/server/display/DisplayPowerController.java +12 −1 Original line number Diff line number Diff line Loading @@ -760,8 +760,14 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call brightness = mScreenBrightnessForVr; } boolean setBrightnessToOverride = false; if (brightness < 0 && mPowerRequest.screenBrightnessOverride > 0) { brightness = mPowerRequest.screenBrightnessOverride; // If there's a screen brightness override, we want to reset the brightness to it // whenever the user changes it, to communicate that these changes aren't taking // effect. However, for a nicer user experience, we don't do it here, but rather after // the temporary brightness has been taken into account. setBrightnessToOverride = true; } final boolean autoBrightnessEnabledInDoze = Loading @@ -784,6 +790,12 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call brightnessIsTemporary = true; } // Reset the brightness to the screen brightness override to communicate to the user that // her changes aren't taking effect. if (setBrightnessToOverride && !brightnessIsTemporary) { putScreenBrightnessSetting(brightness); } final boolean autoBrightnessAdjustmentChanged = updateAutoBrightnessAdjustment(); if (autoBrightnessAdjustmentChanged) { mTemporaryAutoBrightnessAdjustment = Float.NaN; Loading Loading @@ -867,7 +879,6 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call brightness = clampScreenBrightness(mCurrentScreenBrightnessSetting); } // Apply dimming by at least some minimum amount when user activity // timeout is about to expire. if (mPowerRequest.policy == DisplayPowerRequest.POLICY_DIM) { Loading Loading
services/core/java/com/android/server/display/DisplayPowerController.java +12 −1 Original line number Diff line number Diff line Loading @@ -760,8 +760,14 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call brightness = mScreenBrightnessForVr; } boolean setBrightnessToOverride = false; if (brightness < 0 && mPowerRequest.screenBrightnessOverride > 0) { brightness = mPowerRequest.screenBrightnessOverride; // If there's a screen brightness override, we want to reset the brightness to it // whenever the user changes it, to communicate that these changes aren't taking // effect. However, for a nicer user experience, we don't do it here, but rather after // the temporary brightness has been taken into account. setBrightnessToOverride = true; } final boolean autoBrightnessEnabledInDoze = Loading @@ -784,6 +790,12 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call brightnessIsTemporary = true; } // Reset the brightness to the screen brightness override to communicate to the user that // her changes aren't taking effect. if (setBrightnessToOverride && !brightnessIsTemporary) { putScreenBrightnessSetting(brightness); } final boolean autoBrightnessAdjustmentChanged = updateAutoBrightnessAdjustment(); if (autoBrightnessAdjustmentChanged) { mTemporaryAutoBrightnessAdjustment = Float.NaN; Loading Loading @@ -867,7 +879,6 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call brightness = clampScreenBrightness(mCurrentScreenBrightnessSetting); } // Apply dimming by at least some minimum amount when user activity // timeout is about to expire. if (mPowerRequest.policy == DisplayPowerRequest.POLICY_DIM) { Loading