summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java b/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
index 04b46705226f..aa66b75325c2 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
@@ -531,9 +531,13 @@ public class DozeTriggers implements DozeMachine.Part {
Assert.isMainThread();
mDozeHost.extendPulse(reason);
+ // we can't determine the dozing state if we're currently transitioning
+ final DozeMachine.State dozeState =
+ mMachine.isExecutingTransition() ? null : mMachine.getState();
+
// When already pulsing we're allowed to show the wallpaper directly without
// requesting a new pulse.
- if (mMachine.getState() == DozeMachine.State.DOZE_PULSING
+ if (dozeState == DozeMachine.State.DOZE_PULSING
&& reason == DozeLog.PULSE_REASON_SENSOR_WAKE_LOCK_SCREEN) {
mMachine.requestState(DozeMachine.State.DOZE_PULSING_BRIGHT);
return;
@@ -541,8 +545,7 @@ public class DozeTriggers implements DozeMachine.Part {
if (mPulsePending || !mAllowPulseTriggers || !canPulse()) {
if (mAllowPulseTriggers) {
- mDozeLog.tracePulseDropped(mPulsePending, mMachine.getState(),
- mDozeHost.isPulsingBlocked());
+ mDozeLog.tracePulseDropped(mPulsePending, dozeState, mDozeHost.isPulsingBlocked());
}
runIfNotNull(onPulseSuppressedListener);
return;