AOD: Only play wakeup animation when actually waking up

Fixes an issue where the wake up animation could play when going to sleep,
if the screen turning on for AOD happened after the finishing going to sleep.

Change-Id: I6b00aaefb672a630f43ca229d6cc66d12bc4205c
Fixes: 64814671
Test: Pull up app launcher, turn off screen, verify AOD does not blink.
This commit is contained in:
Adrian Roos
2017-08-21 17:17:20 +02:00
parent 1ec1ab6803
commit b9afae2e50

View File

@@ -5261,8 +5261,7 @@ public class StatusBar extends SystemUI implements DemoMode,
private void maybePrepareWakeUpFromAod() {
int wakefulness = mWakefulnessLifecycle.getWakefulness();
if (mDozing && (wakefulness == WAKEFULNESS_WAKING
|| wakefulness == WAKEFULNESS_ASLEEP) && !isPulsing()) {
if (mDozing && wakefulness == WAKEFULNESS_WAKING && !isPulsing()) {
mScrimController.prepareWakeUpFromAod();
}
}