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

Commit 62842069 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Allow silent clear all to remove bundles that are in the shelf

Test: NotificationStackScrollLayoutTest
Fixes: 430350000
Flag: com.android.systemui.notification_bundle_ui
Change-Id: Ic11bfe0849448332ceadb2c537951f3e514a9808
parent 1149807e
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -5826,6 +5826,12 @@ public class NotificationStackScrollLayout
                && (!hasClipBounds || mTmpRect.height() > 0);
    }

    public boolean isVisibleOrIsVisibleInShelf(ExpandableNotificationRow row) {
        return isVisible(row)
                || (NotificationBundleUi.isEnabled()
                && mShelf.getVisibility() != GONE && row.isInShelf());
    }

    /** Whether the group is expanded to show the child notifications, and they are visible. */
    private boolean areChildrenVisible(ExpandableNotificationRow parent) {
        List<ExpandableNotificationRow> children = parent.getAttachedChildren();
@@ -5881,7 +5887,7 @@ public class NotificationStackScrollLayout
                viewsToRemove.add(parent);
            }
            List<ExpandableNotificationRow> children = parent.getAttachedChildren();
            if (isVisible(parent) && children != null) {
            if (isVisibleOrIsVisibleInShelf(parent) && children != null) {
                for (ExpandableNotificationRow child : children) {
                    if (includeChildInClearAll(parent, selection)) {
                        viewsToRemove.add(child);