From fa9008bf1e30614428e00c33c40eb133b8c99a35 Mon Sep 17 00:00:00 2001 From: Josh Tsuji Date: Fri, 29 Apr 2022 15:27:31 -0400 Subject: [PATCH] Fix wakeAndUnlock immediately after sleep. This resulted in fragments of the shade/keyguard being visible as we unlocked, due to the screen off animation putting the shade in a half KEYGUARD half SHADE state. The existing code assumed that wake and unlock would always be from a fully settled KEYGUARD state. By simply updating the keyguard state as soon as we wakeAndUnlock, things look good. I tried to add a test in CentralSurfacesTest, but StatusBarStateController, etc. are not initialized because that test is not set up correctly. Fixes: 229047510 Fixes: 229047979 Fixes: 230528305 Test: atest SystemUITests Merged-In: I0603d2c1d467c8172764ff23be1c3879b8f2edfe Change-Id: I0603d2c1d467c8172764ff23be1c3879b8f2edfe --- .../systemui/statusbar/phone/CentralSurfacesImpl.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java index e4efb98528feb..ef24d77935622 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -4456,6 +4456,13 @@ public class CentralSurfacesImpl extends CoreStartable implements updateDozingState(); mDozeServiceHost.updateDozing(); updateScrimController(); + + if (mBiometricUnlockController.isWakeAndUnlock()) { + // Usually doze changes are to/from lockscreen/AOD, but if we're wake and + // unlocking we should hide the keyguard ASAP if necessary. + updateIsKeyguard(); + } + updateReportRejectedTouchVisibility(); Trace.endSection(); }