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

Commit 02ff858a authored by Steve Elliott's avatar Steve Elliott Committed by Android (Google) Code Review
Browse files

Merge "Account for bundles when avoiding notif overlap" into main

parents cce71e41 85f518f9
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -1538,9 +1538,7 @@ public class NotificationStackScrollLayout
            boolean canClip = true;
            if (child instanceof ExpandableNotificationRow row) {
                if (row.isChildInGroup()) {
                    ExpandableNotificationRow notifParent = row.getNotificationParent();
                    canClip = notifParent.isGroupExpanded()
                            && !notifParent.isGroupExpansionChanging();
                    canClip = canClipChildRow(row);
                }
                if (row.isBackgroundOpaque()) {
                    canClip = false;
@@ -1568,6 +1566,18 @@ public class NotificationStackScrollLayout
        Collections.sort(overlappingList, mNotGoneIndexComparator);
    }

    private boolean canClipChildRow(ExpandableNotificationRow row) {
        ExpandableNotificationRow notifParent = row.getNotificationParent();
        if (NotificationBundleUi.isEnabled()) {
            return notifParent.isGroupExpanded()
                    && !notifParent.isGroupExpansionChanging()
                    && (!notifParent.isChildInGroup() || canClipChildRow(notifParent));
        } else {
            return notifParent.isGroupExpanded()
                    && !notifParent.isGroupExpansionChanging();
        }
    }

    private void updateScrollStateForAddedChildren() {
        if (mChildrenToAddAnimated.isEmpty()) {
            return;