diff options
author | Jorim Jaggi <jjaggi@google.com> | 2015-08-14 13:56:01 -0700 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2015-08-17 19:21:42 -0700 |
commit | 007f0e8f207d3d6d2f47d725b72459edf317cce9 (patch) | |
tree | 28f91cc82076ddc862a613355c12ec7a06260970 /packages/SystemUI/src/com/android/systemui/doze | |
parent | eb2f302d119faaaf5d63f23f0921da9d756da5b4 (diff) | |
download | frameworks_base-007f0e8f207d3d6d2f47d725b72459edf317cce9.zip frameworks_base-007f0e8f207d3d6d2f47d725b72459edf317cce9.tar.gz frameworks_base-007f0e8f207d3d6d2f47d725b72459edf317cce9.tar.bz2 |
Fix race condition for doze mode and wake-and-unlocking
When pulse was about to turn on and at the same time we were starting
a wake-and-unlock sequence, there was jank because the scrim handling
was not correct anymore. Now, abort the pulse when we are wake-and-
unlocking so we don't see flickering with the scrims anymore.
Bug: 23217476
Change-Id: I331f513b68fb1832b4372d3e2e518b31b556a43c
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/doze')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/doze/DozeHost.java | 1 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/doze/DozeService.java | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeHost.java b/packages/SystemUI/src/com/android/systemui/doze/DozeHost.java index 89a2c74..82a1bfe 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/DozeHost.java +++ b/packages/SystemUI/src/com/android/systemui/doze/DozeHost.java @@ -29,6 +29,7 @@ public interface DozeHost { void stopDozing(); boolean isPowerSaveActive(); boolean isNotificationLightOn(); + boolean isPulsingBlocked(); public interface Callback { void onNewNotifications(); diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java index 887391c..a60b4e7 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java +++ b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java @@ -255,6 +255,9 @@ public class DozeService extends DreamService { } private void continuePulsing(int reason) { + if (mHost.isPulsingBlocked()) { + return; + } mHost.pulseWhileDozing(new DozeHost.PulseCallback() { @Override public void onPulseStarted() { |