Merge "Hide notification footer when QS is expanded." into sc-v2-dev

This commit is contained in:
Jeff DeCew
2021-12-07 22:14:49 +00:00
committed by Android (Google) Code Review

View File

@@ -682,6 +682,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
boolean showFooterView = (showDismissView || getVisibleNotificationCount() > 0) boolean showFooterView = (showDismissView || getVisibleNotificationCount() > 0)
&& mIsCurrentUserSetup // see: b/193149550 && mIsCurrentUserSetup // see: b/193149550
&& mStatusBarState != StatusBarState.KEYGUARD && mStatusBarState != StatusBarState.KEYGUARD
&& mQsExpansionFraction != 1
&& !mUnlockedScreenOffAnimationController.isScreenOffAnimationPlaying() && !mUnlockedScreenOffAnimationController.isScreenOffAnimationPlaying()
&& !mIsRemoteInputActive; && !mIsRemoteInputActive;
boolean showHistory = Settings.Secure.getIntForUser(mContext.getContentResolver(), boolean showHistory = Settings.Secure.getIntForUser(mContext.getContentResolver(),
@@ -4766,6 +4767,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
@ShadeViewRefactor(RefactorComponent.SHADE_VIEW) @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
public void setQsExpansionFraction(float qsExpansionFraction) { public void setQsExpansionFraction(float qsExpansionFraction) {
boolean footerAffected = mQsExpansionFraction != qsExpansionFraction
&& (mQsExpansionFraction == 1 || qsExpansionFraction == 1);
mQsExpansionFraction = qsExpansionFraction; mQsExpansionFraction = qsExpansionFraction;
updateUseRoundedRectClipping(); updateUseRoundedRectClipping();
@@ -4774,6 +4777,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
if (mOwnScrollY > 0) { if (mOwnScrollY > 0) {
setOwnScrollY((int) MathUtils.lerp(mOwnScrollY, 0, mQsExpansionFraction)); setOwnScrollY((int) MathUtils.lerp(mOwnScrollY, 0, mQsExpansionFraction));
} }
if (footerAffected) {
updateFooter();
}
} }
@ShadeViewRefactor(RefactorComponent.COORDINATOR) @ShadeViewRefactor(RefactorComponent.COORDINATOR)