diff options
author | 2021-04-27 04:12:29 +0000 | |
---|---|---|
committer | 2021-04-27 04:12:29 +0000 | |
commit | babcb4fa02b21b74e0b1573d9e91bb4f664a706f (patch) | |
tree | df3fea5aeba232c675d4182632282d6f355ff5ce | |
parent | 68f119447b5e9f7de6de1eba63406fcd872c4051 (diff) | |
parent | 6f97c0a8bf3c58c89d5ccd5ede7e32b6a02c5f83 (diff) |
Merge "Fix notification top clipping" into sc-dev
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java | 7 |
1 files changed, 2 insertions, 5 deletions
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 e3c5546d18da..27ee13ab4eaf 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 @@ -151,9 +151,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; @@ -166,8 +164,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 |