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
Change-Id: Id00a168720a52b491ca3d2de1fbee7cf46b2a683
This commit is contained in:
Jeff DeCew
2021-12-07 03:21:55 +00:00
parent f934a4a248
commit d3c1ea1e28

View File

@@ -683,6 +683,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
boolean showFooterView = (showDismissView || mController.getVisibleNotificationCount() > 0)
&& mIsCurrentUserSetup // see: b/193149550
&& mStatusBarState != StatusBarState.KEYGUARD
&& mQsExpansionFraction != 1
&& !mScreenOffAnimationController.shouldHideNotificationsFooter()
&& !mIsRemoteInputActive;
boolean showHistory = Settings.Secure.getIntForUser(mContext.getContentResolver(),
@@ -4769,6 +4770,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();
@@ -4777,6 +4780,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
if (mOwnScrollY > 0) {
setOwnScrollY((int) MathUtils.lerp(mOwnScrollY, 0, mQsExpansionFraction));
}
if (footerAffected) {
updateFooter();
}
}
@ShadeViewRefactor(RefactorComponent.COORDINATOR)