Clear mPendingScreenOff and stop color fade animiation if screen is on

bug: 24116819
Change-Id: I4a962878001b00daf5473d90cbd257ac318c0446
This commit is contained in:
Chong Zhang
2016-02-16 16:31:48 -08:00
parent 6f1033104d
commit b131c7003b

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