Merge "Prevent null references when updating state" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
42663b07ef
@@ -225,6 +225,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|||||||
protected CentralSurfaces mCentralSurfaces;
|
protected CentralSurfaces mCentralSurfaces;
|
||||||
private NotificationPanelViewController mNotificationPanelViewController;
|
private NotificationPanelViewController mNotificationPanelViewController;
|
||||||
private BiometricUnlockController mBiometricUnlockController;
|
private BiometricUnlockController mBiometricUnlockController;
|
||||||
|
private boolean mCentralSurfacesRegistered;
|
||||||
|
|
||||||
private View mNotificationContainer;
|
private View mNotificationContainer;
|
||||||
|
|
||||||
@@ -356,6 +357,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|||||||
mNotificationContainer = notificationContainer;
|
mNotificationContainer = notificationContainer;
|
||||||
mKeyguardMessageAreaController = mKeyguardMessageAreaFactory.create(
|
mKeyguardMessageAreaController = mKeyguardMessageAreaFactory.create(
|
||||||
centralSurfaces.getKeyguardMessageArea());
|
centralSurfaces.getKeyguardMessageArea());
|
||||||
|
mCentralSurfacesRegistered = true;
|
||||||
|
|
||||||
registerListeners();
|
registerListeners();
|
||||||
}
|
}
|
||||||
@@ -1175,6 +1177,9 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|||||||
};
|
};
|
||||||
|
|
||||||
protected void updateStates() {
|
protected void updateStates() {
|
||||||
|
if (!mCentralSurfacesRegistered) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
boolean showing = mKeyguardStateController.isShowing();
|
boolean showing = mKeyguardStateController.isShowing();
|
||||||
boolean occluded = mKeyguardStateController.isOccluded();
|
boolean occluded = mKeyguardStateController.isOccluded();
|
||||||
boolean bouncerShowing = bouncerIsShowing();
|
boolean bouncerShowing = bouncerIsShowing();
|
||||||
|
|||||||
Reference in New Issue
Block a user