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

Commit b6e045b6 authored by Lucas Dupin's avatar Lucas Dupin Committed by Automerger Merge Worker
Browse files

Merge "Fix notification top clipping" into sc-dev am: babcb4fa

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14316150

Change-Id: I8f86ab40735a2a21062460bafdb9a7d805057f82
parents 5ba782aa babcb4fa
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