Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit babcb4fa authored by Lucas Dupin's avatar Lucas Dupin Committed by Android (Google) Code Review
Browse files

Merge "Fix notification top clipping" into sc-dev

parents 68f11944 6f97c0a8
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -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