From 64c1f5c95b29e0a563b11fcde9d1974ff0cdbf81 Mon Sep 17 00:00:00 2001 From: Beverly Date: Mon, 9 May 2022 18:33:37 +0000 Subject: [PATCH] Don't animate unlocked screen off if QS is expanded Instead of determining whether to run the unlocked screen off animation based on fullyCollapsed, check isExpanded which is the expanded state onPanelExpansionChanged uses when sending panel expansion updates to listeners. This eventually updates DozeParameters#canControlScreenOff => and then checks UnlockedScreenOffAnimationController#shouldPlayUnlockedScreenOffAnimation Test: manually swipe down from home screen to reveal QS, then press power button to AoD, no animation/jank Fixes: 228786469 Change-Id: I0384e1300b6b50aaa8a119d11bf71186fb5379e8 --- .../statusbar/phone/UnlockedScreenOffAnimationController.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 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 c1d0769eaa448..b11751554db37 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt @@ -311,9 +311,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 not fully collapsed. + // disable it if the notification panel is expanded. if ((!this::mCentralSurfaces.isInitialized || - !mCentralSurfaces.notificationPanelViewController.isFullyCollapsed) && + mCentralSurfaces.notificationPanelViewController.isExpanded) && // Status bar might be expanded because we have started // playing the animation already !isAnimationPlaying()