Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +18 −10 Original line number Diff line number Diff line Loading @@ -797,7 +797,7 @@ public class NotificationStackScrollLayout && !onKeyguard() && mUpcomingStatusBarState != StatusBarState.KEYGUARD // quick settings don't affect notifications when not in full screen && (mQsExpansionFraction != 1 || !mQsFullScreen) && (getQsExpansionFraction() != 1 || !mQsFullScreen) && !mScreenOffAnimationController.shouldHideNotificationsFooter() && !mIsRemoteInputActive; } Loading Loading @@ -1528,7 +1528,7 @@ public class NotificationStackScrollLayout float fraction = mAmbientState.getExpansionFraction(); // If we are on quick settings, we need to quickly hide it to show the bouncer to avoid an // overlap. Otherwise, we maintain the normal fraction for smoothness. if (mAmbientState.isBouncerInTransit() && mQsExpansionFraction > 0f) { if (mAmbientState.isBouncerInTransit() && getQsExpansionFraction() > 0f) { fraction = BouncerPanelExpansionCalculator.aboutToShowBouncerProgress(fraction); } final float stackY = MathUtils.lerp(0, endTopPosition, fraction); Loading @@ -1552,7 +1552,7 @@ public class NotificationStackScrollLayout } updateInterpolatedStackHeight(endHeight, fraction); } else { if (mQsExpansionFraction <= 0 && !shouldSkipHeightUpdate()) { if (getQsExpansionFraction() <= 0 && !shouldSkipHeightUpdate()) { final float endHeight = updateStackEndHeight( getHeight(), getEmptyBottomMarginInternal(), getTopPadding()); updateInterpolatedStackHeight(endHeight, fraction); Loading Loading @@ -1705,7 +1705,7 @@ public class NotificationStackScrollLayout stackHeight = (int) height; } else { stackHeight = (int) NotificationUtils.interpolate(stackStartPosition, stackEndPosition, mQsExpansionFraction); stackEndPosition, getQsExpansionFraction()); } } } else { Loading Loading @@ -5271,17 +5271,22 @@ public class NotificationStackScrollLayout return mQsFullScreen; } private float getQsExpansionFraction() { SceneContainerFlag.assertInLegacyMode(); return mQsExpansionFraction; } public void setQsExpansionFraction(float qsExpansionFraction) { SceneContainerFlag.assertInLegacyMode(); boolean footerAffected = mQsExpansionFraction != qsExpansionFraction && (mQsExpansionFraction == 1 || qsExpansionFraction == 1); boolean footerAffected = getQsExpansionFraction() != qsExpansionFraction && (getQsExpansionFraction() == 1 || qsExpansionFraction == 1); mQsExpansionFraction = qsExpansionFraction; updateUseRoundedRectClipping(); // If notifications are scrolled, // clear out scrollY by the time we push notifications offscreen if (getOwnScrollY() > 0) { setOwnScrollY((int) MathUtils.lerp(getOwnScrollY(), 0, mQsExpansionFraction)); setOwnScrollY((int) MathUtils.lerp(getOwnScrollY(), 0, getQsExpansionFraction())); } if (!FooterViewRefactor.isEnabled() && footerAffected) { updateFooter(); Loading Loading @@ -5514,7 +5519,6 @@ public class NotificationStackScrollLayout println(pw, "suppressChildrenMeasureLayout", mSuppressChildrenMeasureAndLayout); println(pw, "scrollY", mAmbientState.getScrollY()); println(pw, "showShelfOnly", mShouldShowShelfOnly); println(pw, "qsExpandFraction", mQsExpansionFraction); println(pw, "isCurrentUserSetup", mIsCurrentUserSetup); println(pw, "hideAmount", mAmbientState.getHideAmount()); println(pw, "ambientStateSwipingUp", mAmbientState.isSwipingUp()); Loading Loading @@ -5550,6 +5554,7 @@ public class NotificationStackScrollLayout println(pw, "contentHeight", getContentHeight()); println(pw, "topPadding", getTopPadding()); println(pw, "maxTopPadding", getMaxTopPadding()); println(pw, "qsExpandFraction", getQsExpansionFraction()); } }); pw.println(); Loading Loading @@ -5622,7 +5627,9 @@ public class NotificationStackScrollLayout pw.println("mIsCurrentUserSetup: " + mIsCurrentUserSetup); pw.println("onKeyguard: " + onKeyguard()); pw.println("mUpcomingStatusBarState: " + mUpcomingStatusBarState); pw.println("mQsExpansionFraction: " + mQsExpansionFraction); if (!SceneContainerFlag.isEnabled()) { pw.println("QsExpansionFraction: " + getQsExpansionFraction()); } pw.println("mQsFullScreen: " + mQsFullScreen); pw.println( "mScreenOffAnimationController" Loading Loading @@ -6246,7 +6253,8 @@ public class NotificationStackScrollLayout if (SceneContainerFlag.isEnabled()) return; // We don't want to clip notifications when QS is expanded, because incoming heads up on // the bottom would be clipped otherwise boolean qsAllowsClipping = mQsExpansionFraction < 0.5f || mShouldUseSplitNotificationShade; boolean qsAllowsClipping = getQsExpansionFraction() < 0.5f || mShouldUseSplitNotificationShade; boolean clip = mIsExpanded && qsAllowsClipping; if (clip != mShouldUseRoundedRectClipping) { mShouldUseRoundedRectClipping = clip; Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java +4 −0 Original line number Diff line number Diff line Loading @@ -610,6 +610,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) @DisableSceneContainer public void testUpdateFooter_remoteInput() { setBarStateForTest(StatusBarState.SHADE); mStackScroller.setCurrentUserSetup(true); Loading Loading @@ -643,6 +644,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) @DisableSceneContainer public void testUpdateFooter_oneClearableNotification() { setBarStateForTest(StatusBarState.SHADE); mStackScroller.setCurrentUserSetup(true); Loading @@ -659,6 +661,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) @DisableSceneContainer public void testUpdateFooter_withoutHistory() { setBarStateForTest(StatusBarState.SHADE); mStackScroller.setCurrentUserSetup(true); Loading Loading @@ -692,6 +695,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) @DisableSceneContainer public void testUpdateFooter_oneNonClearableNotification() { setBarStateForTest(StatusBarState.SHADE); mStackScroller.setCurrentUserSetup(true); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +18 −10 Original line number Diff line number Diff line Loading @@ -797,7 +797,7 @@ public class NotificationStackScrollLayout && !onKeyguard() && mUpcomingStatusBarState != StatusBarState.KEYGUARD // quick settings don't affect notifications when not in full screen && (mQsExpansionFraction != 1 || !mQsFullScreen) && (getQsExpansionFraction() != 1 || !mQsFullScreen) && !mScreenOffAnimationController.shouldHideNotificationsFooter() && !mIsRemoteInputActive; } Loading Loading @@ -1528,7 +1528,7 @@ public class NotificationStackScrollLayout float fraction = mAmbientState.getExpansionFraction(); // If we are on quick settings, we need to quickly hide it to show the bouncer to avoid an // overlap. Otherwise, we maintain the normal fraction for smoothness. if (mAmbientState.isBouncerInTransit() && mQsExpansionFraction > 0f) { if (mAmbientState.isBouncerInTransit() && getQsExpansionFraction() > 0f) { fraction = BouncerPanelExpansionCalculator.aboutToShowBouncerProgress(fraction); } final float stackY = MathUtils.lerp(0, endTopPosition, fraction); Loading @@ -1552,7 +1552,7 @@ public class NotificationStackScrollLayout } updateInterpolatedStackHeight(endHeight, fraction); } else { if (mQsExpansionFraction <= 0 && !shouldSkipHeightUpdate()) { if (getQsExpansionFraction() <= 0 && !shouldSkipHeightUpdate()) { final float endHeight = updateStackEndHeight( getHeight(), getEmptyBottomMarginInternal(), getTopPadding()); updateInterpolatedStackHeight(endHeight, fraction); Loading Loading @@ -1705,7 +1705,7 @@ public class NotificationStackScrollLayout stackHeight = (int) height; } else { stackHeight = (int) NotificationUtils.interpolate(stackStartPosition, stackEndPosition, mQsExpansionFraction); stackEndPosition, getQsExpansionFraction()); } } } else { Loading Loading @@ -5271,17 +5271,22 @@ public class NotificationStackScrollLayout return mQsFullScreen; } private float getQsExpansionFraction() { SceneContainerFlag.assertInLegacyMode(); return mQsExpansionFraction; } public void setQsExpansionFraction(float qsExpansionFraction) { SceneContainerFlag.assertInLegacyMode(); boolean footerAffected = mQsExpansionFraction != qsExpansionFraction && (mQsExpansionFraction == 1 || qsExpansionFraction == 1); boolean footerAffected = getQsExpansionFraction() != qsExpansionFraction && (getQsExpansionFraction() == 1 || qsExpansionFraction == 1); mQsExpansionFraction = qsExpansionFraction; updateUseRoundedRectClipping(); // If notifications are scrolled, // clear out scrollY by the time we push notifications offscreen if (getOwnScrollY() > 0) { setOwnScrollY((int) MathUtils.lerp(getOwnScrollY(), 0, mQsExpansionFraction)); setOwnScrollY((int) MathUtils.lerp(getOwnScrollY(), 0, getQsExpansionFraction())); } if (!FooterViewRefactor.isEnabled() && footerAffected) { updateFooter(); Loading Loading @@ -5514,7 +5519,6 @@ public class NotificationStackScrollLayout println(pw, "suppressChildrenMeasureLayout", mSuppressChildrenMeasureAndLayout); println(pw, "scrollY", mAmbientState.getScrollY()); println(pw, "showShelfOnly", mShouldShowShelfOnly); println(pw, "qsExpandFraction", mQsExpansionFraction); println(pw, "isCurrentUserSetup", mIsCurrentUserSetup); println(pw, "hideAmount", mAmbientState.getHideAmount()); println(pw, "ambientStateSwipingUp", mAmbientState.isSwipingUp()); Loading Loading @@ -5550,6 +5554,7 @@ public class NotificationStackScrollLayout println(pw, "contentHeight", getContentHeight()); println(pw, "topPadding", getTopPadding()); println(pw, "maxTopPadding", getMaxTopPadding()); println(pw, "qsExpandFraction", getQsExpansionFraction()); } }); pw.println(); Loading Loading @@ -5622,7 +5627,9 @@ public class NotificationStackScrollLayout pw.println("mIsCurrentUserSetup: " + mIsCurrentUserSetup); pw.println("onKeyguard: " + onKeyguard()); pw.println("mUpcomingStatusBarState: " + mUpcomingStatusBarState); pw.println("mQsExpansionFraction: " + mQsExpansionFraction); if (!SceneContainerFlag.isEnabled()) { pw.println("QsExpansionFraction: " + getQsExpansionFraction()); } pw.println("mQsFullScreen: " + mQsFullScreen); pw.println( "mScreenOffAnimationController" Loading Loading @@ -6246,7 +6253,8 @@ public class NotificationStackScrollLayout if (SceneContainerFlag.isEnabled()) return; // We don't want to clip notifications when QS is expanded, because incoming heads up on // the bottom would be clipped otherwise boolean qsAllowsClipping = mQsExpansionFraction < 0.5f || mShouldUseSplitNotificationShade; boolean qsAllowsClipping = getQsExpansionFraction() < 0.5f || mShouldUseSplitNotificationShade; boolean clip = mIsExpanded && qsAllowsClipping; if (clip != mShouldUseRoundedRectClipping) { mShouldUseRoundedRectClipping = clip; Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java +4 −0 Original line number Diff line number Diff line Loading @@ -610,6 +610,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) @DisableSceneContainer public void testUpdateFooter_remoteInput() { setBarStateForTest(StatusBarState.SHADE); mStackScroller.setCurrentUserSetup(true); Loading Loading @@ -643,6 +644,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) @DisableSceneContainer public void testUpdateFooter_oneClearableNotification() { setBarStateForTest(StatusBarState.SHADE); mStackScroller.setCurrentUserSetup(true); Loading @@ -659,6 +661,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) @DisableSceneContainer public void testUpdateFooter_withoutHistory() { setBarStateForTest(StatusBarState.SHADE); mStackScroller.setCurrentUserSetup(true); Loading Loading @@ -692,6 +695,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { @Test @DisableFlags({FooterViewRefactor.FLAG_NAME, NotifRedesignFooter.FLAG_NAME}) @DisableSceneContainer public void testUpdateFooter_oneNonClearableNotification() { setBarStateForTest(StatusBarState.SHADE); mStackScroller.setCurrentUserSetup(true); Loading