Merge "Revert "DO NOT MERGE: Disable dim brightness reset when using ALS-based doze"" into cw-f-dev

This commit is contained in:
Julius D'souza
2016-10-22 03:57:59 +00:00
committed by Android (Google) Code Review

View File

@@ -686,10 +686,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
}
// Apply dimming by at least some minimum amount when user activity
// timeout is about to expire unless we're having an ALS-based doze brightness
// in which case the brightness could increase, causing unwanted flashes.
if (mPowerRequest.policy == DisplayPowerRequest.POLICY_DIM
&& !mAllowAutoBrightnessWhileDozingConfig) {
// timeout is about to expire.
if (mPowerRequest.policy == DisplayPowerRequest.POLICY_DIM) {
if (brightness > mScreenBrightnessRangeMinimum) {
brightness = Math.max(Math.min(brightness - SCREEN_DIM_MINIMUM_REDUCTION,
mScreenBrightnessDimConfig), mScreenBrightnessRangeMinimum);