summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alessandro Recchi <arecchi@google.com> 2022-10-17 16:13:30 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-10-17 16:13:30 +0000
commitd9f9ceb208f2f9899e4b0420f0b2da0493cdf8d2 (patch)
treeb8a338dc36dcae24db57f00b54b8fd53be4a0fad
parent7874e655e757ff0497fb7f23d89befe7f59fcf34 (diff)
parent42663b07efa137fb0b6d1af29429d926cbaedcaf (diff)
Merge "Prevent null references when updating state" into tm-qpr-dev am: 42663b07ef
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20165505 Change-Id: I9c65a3d79542b5cc3ce03e4c7e5dc2a267419361 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java5
1 files changed, 5 insertions, 0 deletions
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 b9312c7fc40a..ebc79ecde134 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -225,6 +225,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
protected CentralSurfaces mCentralSurfaces;
private NotificationPanelViewController mNotificationPanelViewController;
private BiometricUnlockController mBiometricUnlockController;
+ private boolean mCentralSurfacesRegistered;
private View mNotificationContainer;
@@ -356,6 +357,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
mNotificationContainer = notificationContainer;
mKeyguardMessageAreaController = mKeyguardMessageAreaFactory.create(
centralSurfaces.getKeyguardMessageArea());
+ mCentralSurfacesRegistered = true;
registerListeners();
}
@@ -1175,6 +1177,9 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
};
protected void updateStates() {
+ if (!mCentralSurfacesRegistered) {
+ return;
+ }
boolean showing = mKeyguardStateController.isShowing();
boolean occluded = mKeyguardStateController.isOccluded();
boolean bouncerShowing = bouncerIsShowing();