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

Commit 85f518f9 authored by Steve Elliott's avatar Steve Elliott
Browse files

Account for bundles when avoiding notif overlap

Flag: com.android.systemui.notification_bundle_ui
Fixes: 422351538
Test: manual
Change-Id: Ibc7847bd436c39d013bdaf3eb5536855581b4198
parent 17c46e65
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -1549,9 +1549,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);
                }
                // handle the notGoneIndex for the children as well
                List<ExpandableNotificationRow> children = row.getAttachedChildren();
@@ -1576,6 +1574,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;