Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +9 −7 Original line number Diff line number Diff line Loading @@ -664,7 +664,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mDebugPaint.setColor(Color.CYAN); canvas.drawLine(0, y, getWidth(), y, mDebugPaint); y = (int) (mAmbientState.getStackY() + mAmbientState.getStackHeight()); y = (int) (mAmbientState.getStackY() + mSidePaddings + mAmbientState.getStackHeight()); mDebugPaint.setColor(Color.BLUE); canvas.drawLine(0, y, getWidth(), y, mDebugPaint); } Loading Loading @@ -1148,13 +1148,15 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable if (mOnStackYChanged != null) { mOnStackYChanged.run(); } final float stackEndHeight = getHeight() - getEmptyBottomMargin() - mTopPadding; if (mQsExpansionFraction <= 0) { final float stackEndHeight = Math.max(0f, getHeight() - getEmptyBottomMargin() - stackY - mSidePaddings); mAmbientState.setStackEndHeight(stackEndHeight); mAmbientState.setStackHeight( MathUtils.lerp(stackEndHeight * StackScrollAlgorithm.START_FRACTION, stackEndHeight, fraction)); } } void setOnStackYChanged(Runnable onStackYChanged) { mOnStackYChanged = onStackYChanged; Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +8 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ public class StackScrollAlgorithm { private int mStatusBarHeight; private float mHeadsUpInset; private int mPinnedZTranslationExtra; private float mNotificationScrimPadding; public StackScrollAlgorithm( Context context, Loading @@ -82,6 +83,7 @@ public class StackScrollAlgorithm { mPinnedZTranslationExtra = res.getDimensionPixelSize( R.dimen.heads_up_pinned_elevation); mGapHeight = res.getDimensionPixelSize(R.dimen.notification_section_divider_height); mNotificationScrimPadding = res.getDimensionPixelSize(R.dimen.notification_side_paddings); } /** Loading Loading @@ -258,6 +260,9 @@ public class StackScrollAlgorithm { // expanded. Consider updating these states in updateContentView instead so that we don't // have to recalculate in every frame. float currentY = -scrollY; if (!ambientState.isOnKeyguard()) { currentY += mNotificationScrimPadding; } float previousY = 0; state.firstViewInShelf = null; state.viewHeightBeforeShelf = -1; Loading Loading @@ -318,6 +323,9 @@ public class StackScrollAlgorithm { AmbientState ambientState) { // The y coordinate of the current child. float currentYPosition = -algorithmState.scrollY; if (!ambientState.isOnKeyguard()) { currentYPosition += mNotificationScrimPadding; } int childCount = algorithmState.visibleChildren.size(); for (int i = 0; i < childCount; i++) { currentYPosition = updateChild(i, algorithmState, ambientState, currentYPosition); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +3 −4 Original line number Diff line number Diff line Loading @@ -2072,14 +2072,13 @@ public class NotificationPanelViewController extends PanelViewController { final int qsPanelBottomY = calculateQsBottomPosition(getQsExpansionFraction()); final boolean visible = (getQsExpansionFraction() > 0 || qsPanelBottomY > 0) && !mShouldUseSplitNotificationShade; final float notificationTop = mAmbientState.getStackY() - mNotificationScrimPadding - mAmbientState.getScrollY(); final float notificationTop = mAmbientState.getStackY() - mAmbientState.getScrollY(); setQsExpansionEnabled(mAmbientState.getScrollY() == 0); int radius = mScrimCornerRadius; if (!mShouldUseSplitNotificationShade) { top = (int) Math.min(qsPanelBottomY, notificationTop); top = (int) (isOnKeyguard() ? Math.min(qsPanelBottomY, notificationTop) : notificationTop); bottom = getView().getBottom(); left = getView().getLeft(); right = getView().getRight(); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +9 −7 Original line number Diff line number Diff line Loading @@ -664,7 +664,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mDebugPaint.setColor(Color.CYAN); canvas.drawLine(0, y, getWidth(), y, mDebugPaint); y = (int) (mAmbientState.getStackY() + mAmbientState.getStackHeight()); y = (int) (mAmbientState.getStackY() + mSidePaddings + mAmbientState.getStackHeight()); mDebugPaint.setColor(Color.BLUE); canvas.drawLine(0, y, getWidth(), y, mDebugPaint); } Loading Loading @@ -1148,13 +1148,15 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable if (mOnStackYChanged != null) { mOnStackYChanged.run(); } final float stackEndHeight = getHeight() - getEmptyBottomMargin() - mTopPadding; if (mQsExpansionFraction <= 0) { final float stackEndHeight = Math.max(0f, getHeight() - getEmptyBottomMargin() - stackY - mSidePaddings); mAmbientState.setStackEndHeight(stackEndHeight); mAmbientState.setStackHeight( MathUtils.lerp(stackEndHeight * StackScrollAlgorithm.START_FRACTION, stackEndHeight, fraction)); } } void setOnStackYChanged(Runnable onStackYChanged) { mOnStackYChanged = onStackYChanged; Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +8 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ public class StackScrollAlgorithm { private int mStatusBarHeight; private float mHeadsUpInset; private int mPinnedZTranslationExtra; private float mNotificationScrimPadding; public StackScrollAlgorithm( Context context, Loading @@ -82,6 +83,7 @@ public class StackScrollAlgorithm { mPinnedZTranslationExtra = res.getDimensionPixelSize( R.dimen.heads_up_pinned_elevation); mGapHeight = res.getDimensionPixelSize(R.dimen.notification_section_divider_height); mNotificationScrimPadding = res.getDimensionPixelSize(R.dimen.notification_side_paddings); } /** Loading Loading @@ -258,6 +260,9 @@ public class StackScrollAlgorithm { // expanded. Consider updating these states in updateContentView instead so that we don't // have to recalculate in every frame. float currentY = -scrollY; if (!ambientState.isOnKeyguard()) { currentY += mNotificationScrimPadding; } float previousY = 0; state.firstViewInShelf = null; state.viewHeightBeforeShelf = -1; Loading Loading @@ -318,6 +323,9 @@ public class StackScrollAlgorithm { AmbientState ambientState) { // The y coordinate of the current child. float currentYPosition = -algorithmState.scrollY; if (!ambientState.isOnKeyguard()) { currentYPosition += mNotificationScrimPadding; } int childCount = algorithmState.visibleChildren.size(); for (int i = 0; i < childCount; i++) { currentYPosition = updateChild(i, algorithmState, ambientState, currentYPosition); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +3 −4 Original line number Diff line number Diff line Loading @@ -2072,14 +2072,13 @@ public class NotificationPanelViewController extends PanelViewController { final int qsPanelBottomY = calculateQsBottomPosition(getQsExpansionFraction()); final boolean visible = (getQsExpansionFraction() > 0 || qsPanelBottomY > 0) && !mShouldUseSplitNotificationShade; final float notificationTop = mAmbientState.getStackY() - mNotificationScrimPadding - mAmbientState.getScrollY(); final float notificationTop = mAmbientState.getStackY() - mAmbientState.getScrollY(); setQsExpansionEnabled(mAmbientState.getScrollY() == 0); int radius = mScrimCornerRadius; if (!mShouldUseSplitNotificationShade) { top = (int) Math.min(qsPanelBottomY, notificationTop); top = (int) (isOnKeyguard() ? Math.min(qsPanelBottomY, notificationTop) : notificationTop); bottom = getView().getBottom(); left = getView().getLeft(); right = getView().getRight(); Loading