From f9fd46830025f05e5f14f70492f837c7c7b32329 Mon Sep 17 00:00:00 2001 From: wilsonshih Date: Tue, 22 Dec 2020 14:43:32 +0800 Subject: [PATCH] Fix the device been wake up after dozing. The real device would be wake up after dozing because of hiding bouncer. The sequence would be like: DozeServiceHost#updateDozing StatusBarKeyguardViewManager#reset StatusBarKeyguardViewManager#hideBouncer. And if the expansion state is EXPANSION_VISIBLE, hide bouncer will overwrite the expansion to EXPANSION_HIDDEN, which would cause KeyguardBouncer#dispatchFullyShown then wakeup the device. A simple idea is we don't need to overwrite the expansion state while hide bouncer since dispatchExpansionChanged can be triggerred when setExpansion been called. Bug: 175423965 Bug: 175920249 Test: atest KeyguardTests Change-Id: I911ed31ccb402713eb0a00faf0b176c88488501b --- .../com/android/systemui/statusbar/phone/KeyguardBouncer.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java index 4ca9c5db013c8..db0713cf0b7a8 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java @@ -289,8 +289,6 @@ public class KeyguardBouncer { SysUiStatsLog.KEYGUARD_BOUNCER_STATE_CHANGED__STATE__HIDDEN); mDismissCallbackRegistry.notifyDismissCancelled(); } - mExpansion = EXPANSION_HIDDEN; - dispatchExpansionChanged(); mIsScrimmed = false; mFalsingCollector.onBouncerHidden(); mCallback.onBouncerVisiblityChanged(false /* shown */);