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

Commit 88e7d3b0 authored by Lyn Han's avatar Lyn Han Committed by Android (Google) Code Review
Browse files

Merge changes Icbc8f42b,I442e49b9,Ie18d5f99 into main

* changes:
  Handle BundleEntry case in HeadsUpCoordinator
  Ignore bundles when stabilizing groups
  Clear mIdToBundleEntry in setBundler
parents 64ad0119 d4ccc7bb
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -282,18 +282,16 @@ public class ShadeListBuilder implements Dumpable, PipelineDumpable {
        Assert.isMainThread();
        mPipelineState.requireState(STATE_IDLE);

        // TODO(b/396301289) throw exception when setting more than once?
        mNotifBundler = bundler;

        if (mIdToBundleEntry.isEmpty()) {
        if (mNotifBundler == null) {
                throw new IllegalStateException("NotifBundler not attached.");
            throw new IllegalStateException(TAG + ".setBundler: null");
        }

        mIdToBundleEntry.clear();
        for (String id: mNotifBundler.getBundleIds()) {
            mIdToBundleEntry.put(id, new BundleEntry(id));
        }
    }
    }

    void setNotifStabilityManager(@NonNull NotifStabilityManager notifStabilityManager) {
        Assert.isMainThread();
@@ -681,7 +679,7 @@ public class ShadeListBuilder implements Dumpable, PipelineDumpable {
                        j--;
                    }
                }
            } else {
            } else if (tle instanceof NotificationEntry) {
                // maybe put top-level-entries back into their previous groups
                if (maybeSuppressGroupChange(tle.getRepresentativeEntry(), topLevelList)) {
                    // entry was put back into its previous group, so we remove it from the list of
@@ -689,7 +687,7 @@ public class ShadeListBuilder implements Dumpable, PipelineDumpable {
                    topLevelList.remove(i);
                    i--;
                }
            }
            } // Promoters ignore bundles so we don't have to demote any here.
        }
        Trace.endSection();
    }
+3 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import com.android.systemui.statusbar.NotificationRemoteInputManager
import com.android.systemui.statusbar.chips.notification.domain.interactor.StatusBarNotificationChipsInteractor
import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips
import com.android.systemui.statusbar.notification.NotifPipelineFlags
import com.android.systemui.statusbar.notification.collection.BundleEntry
import com.android.systemui.statusbar.notification.collection.GroupEntry
import com.android.systemui.statusbar.notification.collection.NotifCollection
import com.android.systemui.statusbar.notification.collection.NotifPipeline
@@ -423,6 +424,7 @@ constructor(
                            map[child.key] = GroupLocation.Child
                        }
                    }
                    is BundleEntry -> map[topLevelEntry.key] = GroupLocation.Bundle
                    else -> error("unhandled type $topLevelEntry")
                }
            }
@@ -950,6 +952,7 @@ private enum class GroupLocation {
    Isolated,
    Summary,
    Child,
    Bundle,
}

private fun Map<String, GroupLocation>.getLocation(key: String): GroupLocation =