Merge "Clear mPendingScreenOff and stop color fade animiation if screen is on" into nyc-dev

This commit is contained in:
Chong Zhang
2016-02-17 00:47:40 +00:00
committed by Android (Google) Code Review

View File

@@ -840,7 +840,11 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// If there is already an animation in progress, don't interfere with it.
if (mColorFadeOnAnimator.isStarted()
|| mColorFadeOffAnimator.isStarted()) {
return;
if (target != Display.STATE_ON) {
return;
}
// If display state changed to on, proceed and stop the color fade and turn screen on.
mPendingScreenOff = false;
}
// If we were in the process of turning off the screen but didn't quite