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

Commit 7111d861 authored by lyn's avatar lyn
Browse files

BundleEntry: add ListEntry children

Bug: 395698521
Test: compiles
Flag: com.android.systemui.notification_bundle_ui
Change-Id: If0b9ebd14d779b414d12bca4842bdb448082f470
parent 3e61ab3e
Loading
Loading
Loading
Loading
+19 −1
Original line number Diff line number Diff line
@@ -33,7 +33,8 @@ import androidx.annotation.VisibleForTesting;
import com.android.systemui.statusbar.notification.icon.IconPack;
import com.android.systemui.statusbar.notification.collection.listbuilder.NotifSection;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import kotlinx.coroutines.flow.MutableStateFlow;
@@ -51,10 +52,27 @@ public class BundleEntry extends PipelineEntry {
    // TODO (b/389839319): implement the row
    private ExpandableNotificationRow mRow;

    private final List<ListEntry> mChildren = new ArrayList<>();

    private final List<ListEntry> mUnmodifiableChildren = Collections.unmodifiableList(mChildren);

    public BundleEntry(String key) {
        super(key);
    }

    void addChild(ListEntry child) {
        mChildren.add(child);
    }

    @NonNull
    public List<ListEntry> getChildren() {
        return mUnmodifiableChildren;
    }

    /**
     * @return Null because bundles do not have an associated NotificationEntry.
     */

    @Nullable
    @Override
    public NotificationEntry getRepresentativeEntry() {