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
This commit is contained in:
Matt Pietal
2021-03-09 09:59:44 -05:00
parent c4bbeabbee
commit f4ce81c63c

View File

@@ -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() {