diff options
| author | 2021-07-20 15:33:05 -0400 | |
|---|---|---|
| committer | 2021-07-20 15:33:06 -0400 | |
| commit | cd3c4ec4260dd8c70c046ce0e6a2c7a5f6c1cc54 (patch) | |
| tree | 75da3ed67fc00f5f6c75d6ad7eb0f83049f1e25d | |
| parent | aef0db8f94ee998ad3c65451597cc1a1f7f7fad2 (diff) | |
Fix issue where screen off is disabled after expanding then collapsing the shade.
The root cause is that we only get a callback to update whether we want to control screen off when the shade expansion changes, not when the isExpanding value changes. Sometimes, this value can still be true briefly when the callback is triggered.
We can safely fix this by checking isFullyCollapsed rather than isExpanded || isExpanding. isFullyCollapsed is updated at the same time as isExpanded, so it will be accurate when the callback is triggered.
Fixes: 194212105
Test: expand the shade, collapse it, press power button, see animation
Test: expand shade, press power, don't see animation
Test: press power while in the middle of expanding or collapsing the shade, see no animation
Change-Id: I0396aa4ee6408820d700ac23bea04897f37c4443
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt | 5 |
1 files changed, 2 insertions, 3 deletions
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 4167287a504e..a5b868b6f8a3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt @@ -199,10 +199,9 @@ 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. + // disable it if the notification panel is not fully collapsed. if (!this::statusBar.isInitialized || - statusBar.notificationPanelViewController.isFullyExpanded || - statusBar.notificationPanelViewController.isExpanding) { + !statusBar.notificationPanelViewController.isFullyCollapsed) { return false } |