Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +36 −8 Original line number Diff line number Diff line Loading @@ -715,6 +715,7 @@ public class NotificationStackScrollLayout } public float getNotificationSquishinessFraction() { SceneContainerFlag.assertInLegacyMode(); return mStackScrollAlgorithm.getNotificationSquishinessFraction(mAmbientState); } Loading Loading @@ -860,7 +861,7 @@ public class NotificationStackScrollLayout /* label= */ "getHeight() - mKeyguardBottomPadding = " + y); } y = getHeight() - getEmptyBottomMargin(); y = getHeight() - getEmptyBottomMarginInternal(); drawDebugInfo(canvas, y, Color.GREEN, /* label= */ "getHeight() - getEmptyBottomMargin() = " + y); Loading Loading @@ -1270,7 +1271,7 @@ public class NotificationStackScrollLayout private void updateAlgorithmLayoutMinHeight() { mAmbientState.setLayoutMinHeight(mQsFullScreen || isHeadsUpTransition() ? getLayoutMinHeight() : 0); ? getLayoutMinHeightInternal() : 0); } /** Loading Loading @@ -1444,7 +1445,7 @@ public class NotificationStackScrollLayout } else { if (mQsExpansionFraction <= 0 && !shouldSkipHeightUpdate()) { final float endHeight = updateStackEndHeight( getHeight(), getEmptyBottomMargin(), getTopPadding()); getHeight(), getEmptyBottomMarginInternal(), getTopPadding()); updateStackHeight(endHeight, fraction); } else { // Always updateStackHeight to prevent jumps in the stack height when this fraction Loading Loading @@ -1617,7 +1618,7 @@ public class NotificationStackScrollLayout float appear; float expandAmount; if (mKeyguardBypassEnabled && onKeyguard()) { appear = calculateAppearFractionBypass(); appear = calculateAppearFractionBypassInternal(); expandAmount = getPulseHeight(); } else { appear = MathUtils.saturate(calculateAppearFraction(mExpandedHeight)); Loading @@ -1642,6 +1643,7 @@ public class NotificationStackScrollLayout * Return the height of the content ignoring the footer. */ public int getIntrinsicContentHeight() { SceneContainerFlag.assertInLegacyMode(); return (int) mIntrinsicContentHeight; } Loading Loading @@ -2373,6 +2375,11 @@ public class NotificationStackScrollLayout * @return the first child which has visibility unequal to GONE */ public ExpandableView getFirstChildNotGone() { SceneContainerFlag.assertInLegacyMode(); return getFirstChildNotGoneInternal(); } private ExpandableView getFirstChildNotGoneInternal() { int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { View child = getChildAt(i); Loading Loading @@ -2432,6 +2439,7 @@ public class NotificationStackScrollLayout * @return the number of children which have visibility unequal to GONE */ public int getNotGoneChildCount() { SceneContainerFlag.assertInLegacyMode(); int childCount = getChildCount(); int count = 0; for (int i = 0; i < childCount; i++) { Loading Loading @@ -2642,7 +2650,7 @@ public class NotificationStackScrollLayout */ public void updateTopPadding(float qsHeight, boolean animate) { int topPadding = (int) qsHeight; int minStackHeight = getLayoutMinHeight(); int minStackHeight = getLayoutMinHeightInternal(); if (topPadding + minStackHeight > getHeight()) { mTopPaddingOverflow = topPadding + minStackHeight - getHeight(); } else { Loading @@ -2658,6 +2666,11 @@ public class NotificationStackScrollLayout } public int getLayoutMinHeight() { SceneContainerFlag.assertInLegacyMode(); return getLayoutMinHeightInternal(); } private int getLayoutMinHeightInternal() { if (isHeadsUpTransition()) { ExpandableNotificationRow trackedHeadsUpRow = mAmbientState.getTrackedHeadsUpRow(); if (trackedHeadsUpRow.isAboveShelf()) { Loading Loading @@ -3430,7 +3443,7 @@ public class NotificationStackScrollLayout * @return Whether a y coordinate is inside the content. */ public boolean isInContentBounds(float y) { return y < getHeight() - getEmptyBottomMargin(); return y < getHeight() - getEmptyBottomMarginInternal(); } private float getTouchSlop(MotionEvent event) { Loading Loading @@ -4063,10 +4076,16 @@ public class NotificationStackScrollLayout } boolean isScrolledToBottom() { SceneContainerFlag.assertInLegacyMode(); return mScrollAdapter.isScrolledToBottom(); } int getEmptyBottomMargin() { SceneContainerFlag.assertInLegacyMode(); return getEmptyBottomMarginInternal(); } private int getEmptyBottomMarginInternal() { int contentHeight; if (mShouldUseSplitNotificationShade) { // When in split shade and there are no notifications, the height can be too low, as Loading Loading @@ -4249,7 +4268,7 @@ public class NotificationStackScrollLayout private void updateScrollPositionOnExpandInBottom(ExpandableView view) { if (view instanceof ExpandableNotificationRow row && !onKeyguard()) { // TODO: once we're recycling this will need to check the adapter position of the child if (row.isUserLocked() && row != getFirstChildNotGone()) { if (row.isUserLocked() && row != getFirstChildNotGoneInternal()) { if (row.isSummaryWithChildren()) { return; } Loading Loading @@ -4536,7 +4555,7 @@ public class NotificationStackScrollLayout // clipped when pulsing float ownTranslationZ = 0; if (mKeyguardBypassEnabled && mAmbientState.isHiddenAtAll()) { ExpandableView firstChildNotGone = getFirstChildNotGone(); ExpandableView firstChildNotGone = getFirstChildNotGoneInternal(); if (firstChildNotGone != null && firstChildNotGone.showingPulsing()) { ownTranslationZ = firstChildNotGone.getTranslationZ(); } Loading Loading @@ -4684,10 +4703,12 @@ public class NotificationStackScrollLayout } public int getEmptyShadeViewHeight() { SceneContainerFlag.assertInLegacyMode(); return mEmptyShadeView.getHeight(); } public float getBottomMostNotificationBottom() { SceneContainerFlag.assertInLegacyMode(); final int count = getChildCount(); float max = 0; for (int childIdx = 0; childIdx < count; childIdx++) { Loading Loading @@ -5110,6 +5131,7 @@ public class NotificationStackScrollLayout } public float getOpeningHeight() { SceneContainerFlag.assertInLegacyMode(); if (mEmptyShadeView.getVisibility() == GONE) { return getMinExpansionHeight(); } else { Loading Loading @@ -5566,6 +5588,11 @@ public class NotificationStackScrollLayout } public float calculateAppearFractionBypass() { SceneContainerFlag.assertInLegacyMode(); return calculateAppearFractionBypassInternal(); } private float calculateAppearFractionBypassInternal() { float pulseHeight = getPulseHeight(); // The total distance required to fully reveal the header float totalDistance = getIntrinsicPadding(); Loading Loading @@ -6435,6 +6462,7 @@ public class NotificationStackScrollLayout }; public HeadsUpTouchHelper.Callback getHeadsUpCallback() { SceneContainerFlag.assertInLegacyMode(); return mHeadsUpCallback; } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +21 −0 Original line number Diff line number Diff line Loading @@ -1004,6 +1004,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public int getRight() { SceneContainerFlag.assertInLegacyMode(); return mView.getRight(); } Loading @@ -1015,6 +1016,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { * @return the left of the view. */ public int getLeft() { SceneContainerFlag.assertInLegacyMode(); return mView.getLeft(); } Loading @@ -1022,6 +1024,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { * @return the top of the view. */ public int getTop() { SceneContainerFlag.assertInLegacyMode(); return mView.getTop(); } Loading @@ -1029,6 +1032,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { * @return the bottom of the view. */ public int getBottom() { SceneContainerFlag.assertInLegacyMode(); return mView.getBottom(); } Loading Loading @@ -1158,6 +1162,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public int getIntrinsicContentHeight() { SceneContainerFlag.assertInLegacyMode(); return mView.getIntrinsicContentHeight(); } Loading Loading @@ -1216,6 +1221,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public float getX() { SceneContainerFlag.assertInLegacyMode(); return mView.getX(); } Loading @@ -1224,14 +1230,17 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public float getWidth() { SceneContainerFlag.assertInLegacyMode(); return mView.getWidth(); } public float getOpeningHeight() { SceneContainerFlag.assertInLegacyMode(); return mView.getOpeningHeight(); } public float getBottomMostNotificationBottom() { SceneContainerFlag.assertInLegacyMode(); return mView.getBottomMostNotificationBottom(); } Loading Loading @@ -1266,10 +1275,12 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public float getNotificationSquishinessFraction() { SceneContainerFlag.assertInLegacyMode(); return mView.getNotificationSquishinessFraction(); } public float calculateAppearFractionBypass() { SceneContainerFlag.assertInLegacyMode(); return mView.calculateAppearFractionBypass(); } Loading @@ -1279,22 +1290,27 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public boolean isScrolledToBottom() { SceneContainerFlag.assertInLegacyMode(); return mView.isScrolledToBottom(); } public int getNotGoneChildCount() { SceneContainerFlag.assertInLegacyMode(); return mView.getNotGoneChildCount(); } public float getIntrinsicPadding() { SceneContainerFlag.assertInLegacyMode(); return mView.getIntrinsicPadding(); } public float getLayoutMinHeight() { SceneContainerFlag.assertInLegacyMode(); return mView.getLayoutMinHeight(); } public int getEmptyBottomMargin() { SceneContainerFlag.assertInLegacyMode(); return mView.getEmptyBottomMargin(); } Loading @@ -1307,6 +1323,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public float getEmptyShadeViewHeight() { SceneContainerFlag.assertInLegacyMode(); return mView.getEmptyShadeViewHeight(); } Loading Loading @@ -1474,6 +1491,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public boolean isShowingEmptyShadeView() { SceneContainerFlag.assertInLegacyMode(); return mView.isEmptyShadeViewVisible(); } Loading Loading @@ -1602,6 +1620,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public ExpandableView getFirstChildNotGone() { SceneContainerFlag.assertInLegacyMode(); return mView.getFirstChildNotGone(); } Loading Loading @@ -1713,6 +1732,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public boolean isLongPressInProgress() { SceneContainerFlag.assertInLegacyMode(); return mLongPressedView != null; } Loading @@ -1722,6 +1742,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { * from the keyguard host to the quick settings one. */ public int getFullShadeTransitionInset() { SceneContainerFlag.assertInLegacyMode(); MediaContainerView view = mKeyguardMediaController.getSinglePaneContainer(); if (view == null || view.getHeight() == 0 || mStatusBarStateController.getState() != KEYGUARD) { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +36 −8 Original line number Diff line number Diff line Loading @@ -715,6 +715,7 @@ public class NotificationStackScrollLayout } public float getNotificationSquishinessFraction() { SceneContainerFlag.assertInLegacyMode(); return mStackScrollAlgorithm.getNotificationSquishinessFraction(mAmbientState); } Loading Loading @@ -860,7 +861,7 @@ public class NotificationStackScrollLayout /* label= */ "getHeight() - mKeyguardBottomPadding = " + y); } y = getHeight() - getEmptyBottomMargin(); y = getHeight() - getEmptyBottomMarginInternal(); drawDebugInfo(canvas, y, Color.GREEN, /* label= */ "getHeight() - getEmptyBottomMargin() = " + y); Loading Loading @@ -1270,7 +1271,7 @@ public class NotificationStackScrollLayout private void updateAlgorithmLayoutMinHeight() { mAmbientState.setLayoutMinHeight(mQsFullScreen || isHeadsUpTransition() ? getLayoutMinHeight() : 0); ? getLayoutMinHeightInternal() : 0); } /** Loading Loading @@ -1444,7 +1445,7 @@ public class NotificationStackScrollLayout } else { if (mQsExpansionFraction <= 0 && !shouldSkipHeightUpdate()) { final float endHeight = updateStackEndHeight( getHeight(), getEmptyBottomMargin(), getTopPadding()); getHeight(), getEmptyBottomMarginInternal(), getTopPadding()); updateStackHeight(endHeight, fraction); } else { // Always updateStackHeight to prevent jumps in the stack height when this fraction Loading Loading @@ -1617,7 +1618,7 @@ public class NotificationStackScrollLayout float appear; float expandAmount; if (mKeyguardBypassEnabled && onKeyguard()) { appear = calculateAppearFractionBypass(); appear = calculateAppearFractionBypassInternal(); expandAmount = getPulseHeight(); } else { appear = MathUtils.saturate(calculateAppearFraction(mExpandedHeight)); Loading @@ -1642,6 +1643,7 @@ public class NotificationStackScrollLayout * Return the height of the content ignoring the footer. */ public int getIntrinsicContentHeight() { SceneContainerFlag.assertInLegacyMode(); return (int) mIntrinsicContentHeight; } Loading Loading @@ -2373,6 +2375,11 @@ public class NotificationStackScrollLayout * @return the first child which has visibility unequal to GONE */ public ExpandableView getFirstChildNotGone() { SceneContainerFlag.assertInLegacyMode(); return getFirstChildNotGoneInternal(); } private ExpandableView getFirstChildNotGoneInternal() { int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { View child = getChildAt(i); Loading Loading @@ -2432,6 +2439,7 @@ public class NotificationStackScrollLayout * @return the number of children which have visibility unequal to GONE */ public int getNotGoneChildCount() { SceneContainerFlag.assertInLegacyMode(); int childCount = getChildCount(); int count = 0; for (int i = 0; i < childCount; i++) { Loading Loading @@ -2642,7 +2650,7 @@ public class NotificationStackScrollLayout */ public void updateTopPadding(float qsHeight, boolean animate) { int topPadding = (int) qsHeight; int minStackHeight = getLayoutMinHeight(); int minStackHeight = getLayoutMinHeightInternal(); if (topPadding + minStackHeight > getHeight()) { mTopPaddingOverflow = topPadding + minStackHeight - getHeight(); } else { Loading @@ -2658,6 +2666,11 @@ public class NotificationStackScrollLayout } public int getLayoutMinHeight() { SceneContainerFlag.assertInLegacyMode(); return getLayoutMinHeightInternal(); } private int getLayoutMinHeightInternal() { if (isHeadsUpTransition()) { ExpandableNotificationRow trackedHeadsUpRow = mAmbientState.getTrackedHeadsUpRow(); if (trackedHeadsUpRow.isAboveShelf()) { Loading Loading @@ -3430,7 +3443,7 @@ public class NotificationStackScrollLayout * @return Whether a y coordinate is inside the content. */ public boolean isInContentBounds(float y) { return y < getHeight() - getEmptyBottomMargin(); return y < getHeight() - getEmptyBottomMarginInternal(); } private float getTouchSlop(MotionEvent event) { Loading Loading @@ -4063,10 +4076,16 @@ public class NotificationStackScrollLayout } boolean isScrolledToBottom() { SceneContainerFlag.assertInLegacyMode(); return mScrollAdapter.isScrolledToBottom(); } int getEmptyBottomMargin() { SceneContainerFlag.assertInLegacyMode(); return getEmptyBottomMarginInternal(); } private int getEmptyBottomMarginInternal() { int contentHeight; if (mShouldUseSplitNotificationShade) { // When in split shade and there are no notifications, the height can be too low, as Loading Loading @@ -4249,7 +4268,7 @@ public class NotificationStackScrollLayout private void updateScrollPositionOnExpandInBottom(ExpandableView view) { if (view instanceof ExpandableNotificationRow row && !onKeyguard()) { // TODO: once we're recycling this will need to check the adapter position of the child if (row.isUserLocked() && row != getFirstChildNotGone()) { if (row.isUserLocked() && row != getFirstChildNotGoneInternal()) { if (row.isSummaryWithChildren()) { return; } Loading Loading @@ -4536,7 +4555,7 @@ public class NotificationStackScrollLayout // clipped when pulsing float ownTranslationZ = 0; if (mKeyguardBypassEnabled && mAmbientState.isHiddenAtAll()) { ExpandableView firstChildNotGone = getFirstChildNotGone(); ExpandableView firstChildNotGone = getFirstChildNotGoneInternal(); if (firstChildNotGone != null && firstChildNotGone.showingPulsing()) { ownTranslationZ = firstChildNotGone.getTranslationZ(); } Loading Loading @@ -4684,10 +4703,12 @@ public class NotificationStackScrollLayout } public int getEmptyShadeViewHeight() { SceneContainerFlag.assertInLegacyMode(); return mEmptyShadeView.getHeight(); } public float getBottomMostNotificationBottom() { SceneContainerFlag.assertInLegacyMode(); final int count = getChildCount(); float max = 0; for (int childIdx = 0; childIdx < count; childIdx++) { Loading Loading @@ -5110,6 +5131,7 @@ public class NotificationStackScrollLayout } public float getOpeningHeight() { SceneContainerFlag.assertInLegacyMode(); if (mEmptyShadeView.getVisibility() == GONE) { return getMinExpansionHeight(); } else { Loading Loading @@ -5566,6 +5588,11 @@ public class NotificationStackScrollLayout } public float calculateAppearFractionBypass() { SceneContainerFlag.assertInLegacyMode(); return calculateAppearFractionBypassInternal(); } private float calculateAppearFractionBypassInternal() { float pulseHeight = getPulseHeight(); // The total distance required to fully reveal the header float totalDistance = getIntrinsicPadding(); Loading Loading @@ -6435,6 +6462,7 @@ public class NotificationStackScrollLayout }; public HeadsUpTouchHelper.Callback getHeadsUpCallback() { SceneContainerFlag.assertInLegacyMode(); return mHeadsUpCallback; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +21 −0 Original line number Diff line number Diff line Loading @@ -1004,6 +1004,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public int getRight() { SceneContainerFlag.assertInLegacyMode(); return mView.getRight(); } Loading @@ -1015,6 +1016,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { * @return the left of the view. */ public int getLeft() { SceneContainerFlag.assertInLegacyMode(); return mView.getLeft(); } Loading @@ -1022,6 +1024,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { * @return the top of the view. */ public int getTop() { SceneContainerFlag.assertInLegacyMode(); return mView.getTop(); } Loading @@ -1029,6 +1032,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { * @return the bottom of the view. */ public int getBottom() { SceneContainerFlag.assertInLegacyMode(); return mView.getBottom(); } Loading Loading @@ -1158,6 +1162,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public int getIntrinsicContentHeight() { SceneContainerFlag.assertInLegacyMode(); return mView.getIntrinsicContentHeight(); } Loading Loading @@ -1216,6 +1221,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public float getX() { SceneContainerFlag.assertInLegacyMode(); return mView.getX(); } Loading @@ -1224,14 +1230,17 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public float getWidth() { SceneContainerFlag.assertInLegacyMode(); return mView.getWidth(); } public float getOpeningHeight() { SceneContainerFlag.assertInLegacyMode(); return mView.getOpeningHeight(); } public float getBottomMostNotificationBottom() { SceneContainerFlag.assertInLegacyMode(); return mView.getBottomMostNotificationBottom(); } Loading Loading @@ -1266,10 +1275,12 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public float getNotificationSquishinessFraction() { SceneContainerFlag.assertInLegacyMode(); return mView.getNotificationSquishinessFraction(); } public float calculateAppearFractionBypass() { SceneContainerFlag.assertInLegacyMode(); return mView.calculateAppearFractionBypass(); } Loading @@ -1279,22 +1290,27 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public boolean isScrolledToBottom() { SceneContainerFlag.assertInLegacyMode(); return mView.isScrolledToBottom(); } public int getNotGoneChildCount() { SceneContainerFlag.assertInLegacyMode(); return mView.getNotGoneChildCount(); } public float getIntrinsicPadding() { SceneContainerFlag.assertInLegacyMode(); return mView.getIntrinsicPadding(); } public float getLayoutMinHeight() { SceneContainerFlag.assertInLegacyMode(); return mView.getLayoutMinHeight(); } public int getEmptyBottomMargin() { SceneContainerFlag.assertInLegacyMode(); return mView.getEmptyBottomMargin(); } Loading @@ -1307,6 +1323,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public float getEmptyShadeViewHeight() { SceneContainerFlag.assertInLegacyMode(); return mView.getEmptyShadeViewHeight(); } Loading Loading @@ -1474,6 +1491,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public boolean isShowingEmptyShadeView() { SceneContainerFlag.assertInLegacyMode(); return mView.isEmptyShadeViewVisible(); } Loading Loading @@ -1602,6 +1620,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public ExpandableView getFirstChildNotGone() { SceneContainerFlag.assertInLegacyMode(); return mView.getFirstChildNotGone(); } Loading Loading @@ -1713,6 +1732,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { } public boolean isLongPressInProgress() { SceneContainerFlag.assertInLegacyMode(); return mLongPressedView != null; } Loading @@ -1722,6 +1742,7 @@ public class NotificationStackScrollLayoutController implements Dumpable { * from the keyguard host to the quick settings one. */ public int getFullShadeTransitionInset() { SceneContainerFlag.assertInLegacyMode(); MediaContainerView view = mKeyguardMediaController.getSinglePaneContainer(); if (view == null || view.getHeight() == 0 || mStatusBarStateController.getState() != KEYGUARD) { Loading