From b420e7d78f65de8d1aac5adcf0ffb707d50aa8b6 Mon Sep 17 00:00:00 2001 From: Josh Tsuji Date: Mon, 21 Jun 2021 16:18:02 -0400 Subject: [PATCH] Check whether StatusBar is initialized in ScreenOffAnimationController. Fixes: 191524967 Test: doesn't crash Change-Id: I4d3ec7569251ad1a7e3e7d9148d406ba7949352c --- .../statusbar/phone/UnlockedScreenOffAnimationController.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt index 52bf2d5777760..9a04d39c4e9e9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt @@ -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 }