From 3741a88710d337e1f37c87063aab71e06cba8913 Mon Sep 17 00:00:00 2001 From: Jeff DeCew Date: Tue, 7 Dec 2021 03:21:55 +0000 Subject: [PATCH] Hide notification footer when QS is expanded. This prevents an incorrect animation that occurs if the first notification appears while QS is expanded. Fixes: 201427195 Test: clear shade; expand QS; post notification; observe footer is never visible Merged-In: Id00a168720a52b491ca3d2de1fbee7cf46b2a683 Change-Id: Id00a168720a52b491ca3d2de1fbee7cf46b2a683 --- .../notification/stack/NotificationStackScrollLayout.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index 5477c19261d11..9167b08ecd0cf 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -682,6 +682,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable boolean showFooterView = (showDismissView || getVisibleNotificationCount() > 0) && mIsCurrentUserSetup // see: b/193149550 && mStatusBarState != StatusBarState.KEYGUARD + && mQsExpansionFraction != 1 && !mUnlockedScreenOffAnimationController.isScreenOffAnimationPlaying() && !mIsRemoteInputActive; boolean showHistory = Settings.Secure.getIntForUser(mContext.getContentResolver(), @@ -4766,6 +4767,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) public void setQsExpansionFraction(float qsExpansionFraction) { + boolean footerAffected = mQsExpansionFraction != qsExpansionFraction + && (mQsExpansionFraction == 1 || qsExpansionFraction == 1); mQsExpansionFraction = qsExpansionFraction; updateUseRoundedRectClipping(); @@ -4774,6 +4777,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable if (mOwnScrollY > 0) { setOwnScrollY((int) MathUtils.lerp(mOwnScrollY, 0, mQsExpansionFraction)); } + if (footerAffected) { + updateFooter(); + } } @ShadeViewRefactor(RefactorComponent.COORDINATOR)