diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java index 6cacec71db39a..33aa18fcf5a31 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java @@ -153,9 +153,7 @@ public class StackScrollAlgorithm { private void updateClipping(StackScrollAlgorithmState algorithmState, AmbientState ambientState) { - float drawStart = !ambientState.isOnKeyguard() ? ambientState.getTopPadding() - + ambientState.getStackTranslation() - : 0; + float drawStart = !ambientState.isOnKeyguard() ? ambientState.getStackY() : 0; float clipStart = 0; int childCount = algorithmState.visibleChildren.size(); boolean firstHeadsUp = true; @@ -168,8 +166,7 @@ public class StackScrollAlgorithm { float newYTranslation = state.yTranslation; float newHeight = state.height; float newNotificationEnd = newYTranslation + newHeight; - boolean isHeadsUp = (child instanceof ExpandableNotificationRow) - && ((ExpandableNotificationRow) child).isPinned(); + boolean isHeadsUp = (child instanceof ExpandableNotificationRow) && child.isPinned(); if (mClipNotificationScrollToTop && (!state.inShelf || (isHeadsUp && !firstHeadsUp)) && newYTranslation < clipStart