Merge "Do not process set WindowAnimator param when screen is already on." into oc-mr1-dev

This commit is contained in:
Bryce Lee
2017-09-08 22:57:25 +00:00
committed by Android (Google) Code Review

View File

@@ -1657,7 +1657,14 @@ class WindowStateAnimator {
if (mWin.mAppToken != null) {
mWin.mAppToken.setCanTurnScreenOn(false);
}
mAnimator.mBulkUpdateParams |= SET_TURN_ON_SCREEN;
// We do not add {@code SET_TURN_ON_SCREEN} when the screen is already
// interactive as the value may persist until the next animation, which could
// potentially occurring while turning off the screen. This would lead to the
// screen incorrectly turning back on.
if (!mService.mPowerManager.isInteractive()) {
mAnimator.mBulkUpdateParams |= SET_TURN_ON_SCREEN;
}
}
}
if (hasSurface()) {