OSDN Git Service

AOD: Only play wakeup animation when actually waking up
authorAdrian Roos <roosa@google.com>
Mon, 21 Aug 2017 15:17:20 +0000 (17:17 +0200)
committerAdrian Roos <roosa@google.com>
Wed, 23 Aug 2017 16:39:13 +0000 (16:39 +0000)
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.
(cherry picked from commit b9afae2e50c0240ee103ab44fad13b75aef985b6)

packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java

index 3d2213b..ada98b7 100644 (file)
@@ -5236,8 +5236,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();
         }
     }