Check whether StatusBar is initialized in ScreenOffAnimationController.

Fixes: 191524967
Test: doesn't crash
Change-Id: I4d3ec7569251ad1a7e3e7d9148d406ba7949352c
This commit is contained in:
Josh Tsuji
2021-06-21 16:18:02 -04:00
parent bdd8ff3fdd
commit b420e7d78f

View File

@@ -172,7 +172,8 @@ class UnlockedScreenOffAnimationController @Inject constructor(
// We currently draw both the light reveal scrim, and the AOD UI, in the shade. If it's
// already expanded and showing notifications/QS, the animation looks really messy. For now,
// disable it if the notification panel is expanded.
if (statusBar.notificationPanelViewController.isFullyExpanded) {
if (!this::statusBar.isInitialized ||
statusBar.notificationPanelViewController.isFullyExpanded) {
return false
}