From f4ce81c63c8a10d096a8bf7a39bc6d23f52147a6 Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Tue, 9 Mar 2021 09:59:44 -0500 Subject: [PATCH] PIN/PUK Views not showing after boot An ill-timed onThemeChanged() event can occur after boot, which forces the bouncer to be destroyed. In most cases this is fine, but after boot this leaves the keyguard with nothing to show, as PIN/PUK views are required to unlocked the device. Bug: 182130809 Test: manual, reboot the device with SIM inserted Change-Id: If7b86df15de29b295d86eff610da476b4dbee566 --- .../statusbar/phone/StatusBarKeyguardViewManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java index b4c687d36e6c4..5083e330f9a09 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -739,8 +739,13 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb } public void onThemeChanged() { + boolean wasShowing = mBouncer.isShowing(); + boolean wasScrimmed = mBouncer.isScrimmed(); + hideBouncer(true /* destroyView */); mBouncer.prepare(); + + if (wasShowing) showBouncer(wasScrimmed); } public void onKeyguardFadedAway() {