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 6649f3a5bdfdc..5b8ceb91ddc30 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -194,6 +194,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb protected CentralSurfaces mCentralSurfaces; private NotificationPanelViewController mNotificationPanelViewController; private BiometricUnlockController mBiometricUnlockController; + private boolean mCentralSurfacesRegistered; private View mNotificationContainer; @@ -312,6 +313,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb mNotificationContainer = notificationContainer; mKeyguardMessageAreaController = mKeyguardMessageAreaFactory.create( centralSurfaces.getKeyguardMessageArea()); + mCentralSurfacesRegistered = true; registerListeners(); } @@ -1007,6 +1009,9 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb }; protected void updateStates() { + if (!mCentralSurfacesRegistered) { + return; + } boolean showing = mShowing; boolean occluded = mOccluded; boolean bouncerShowing = mBouncer.isShowing();