From 4491e8a281fca30a7a673edd371bb685870551d0 Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Thu, 12 May 2022 19:37:57 +0000 Subject: [PATCH] [QS] Do not set QS visible when animating away. There is an issue where we have QS visible and when we power off and on very quickly, we flash QS. This is because, upon powering on, we animate QS to close; however QS is still at max height upon powering on, so setQSExpanded is briefly set to true before animating to close. In order to handle this case, we ensure that we do not setQsExpanded to true when we are animating to close Qs. Bug: 232174210 Test: Manual on Large screen and phone devices Change-Id: I570edb380e6ec86d3141061d83368c82f56da887 --- .../statusbar/phone/NotificationPanelViewController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index f15ea627af479..8613e7e1bfa9d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -2314,8 +2314,9 @@ public class NotificationPanelViewController extends PanelViewController { void setQsExpansion(float height) { height = Math.min(Math.max(height, mQsMinExpansionHeight), mQsMaxExpansionHeight); mQsFullyExpanded = height == mQsMaxExpansionHeight && mQsMaxExpansionHeight != 0; + boolean qsAnimatingAway = !mQsAnimatorExpand && mAnimatingQS; if (height > mQsMinExpansionHeight && !mQsExpanded && !mStackScrollerOverscrolling - && !mDozing) { + && !mDozing && !qsAnimatingAway) { setQsExpanded(true); } else if (height <= mQsMinExpansionHeight && mQsExpanded) { setQsExpanded(false);