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

am: a02f168525

* commit 'a02f168525a78e58def8e55f655e50b0dbaaeb55':
  Clear mPendingScreenOff and stop color fade animiation if screen is on
This commit is contained in:
Chong Zhang
2016-02-17 01:23:11 +00:00
committed by android-build-merger

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