[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
This commit is contained in:
Aaron Liu
2022-05-12 19:37:57 +00:00
parent 53c979939c
commit 4491e8a281

View File

@@ -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);