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

Commit 3b9c828a authored by Lucas Dupin's avatar Lucas Dupin Committed by android-build-team Robot
Browse files

Revert "Fix notification top clipping"

This reverts commit 6f97c0a8.

Reason for revert: b/186760125

Change-Id: I2675bb52c453c872505bc5ad420bf33d669bf6e1
(cherry picked from commit 6782bec03d998bf0ca87f6a006832901c5ceb8e3)
parent 412bbff5
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -151,7 +151,9 @@ public class StackScrollAlgorithm {

    private void updateClipping(StackScrollAlgorithmState algorithmState,
            AmbientState ambientState) {
        float drawStart = !ambientState.isOnKeyguard() ? ambientState.getStackY() : 0;
        float drawStart = !ambientState.isOnKeyguard() ? ambientState.getTopPadding()
                + ambientState.getStackTranslation()
                : 0;
        float clipStart = 0;
        int childCount = algorithmState.visibleChildren.size();
        boolean firstHeadsUp = true;
@@ -164,7 +166,8 @@ public class StackScrollAlgorithm {
            float newYTranslation = state.yTranslation;
            float newHeight = state.height;
            float newNotificationEnd = newYTranslation + newHeight;
            boolean isHeadsUp = (child instanceof ExpandableNotificationRow) && child.isPinned();
            boolean isHeadsUp = (child instanceof ExpandableNotificationRow)
                    && ((ExpandableNotificationRow) child).isPinned();
            if (mClipNotificationScrollToTop
                    && (!state.inShelf || (isHeadsUp && !firstHeadsUp))
                    && newYTranslation < clipStart