[SB][Notifs] Create individual interactors for each status bar chip.
This CL defines a new `SingleNotificationChipInteractor` class. For each promoted notification, we create a `SingleNotificationChipInteractor` instance inside `StatusBarNotificationChipsInteractor`. We keep track of all those instances, and then the parent `StatusBarNotificationChipsInteractor` accumulates the state across all interactors and emits that accumulation as a list of actually-valid chips. This is pretty similar to how there's a top-level MobileIconsInteractor to keep track of all the subscriptions, and then individual `MobileIconInteractor` instances for each individual subscription. One reason to do this is that a future CL will hide a notification chip if that notification's app is currently open, and that should happen on an individual chip basis. That'll be much easier to implement if `SingleNotificationChipInteractor` exists. Bug: 364653005 Flag: com.android.systemui.status_bar_notification_chips Test: Start a promoted ongoing notification -> verify chip appears. Dismiss the promoted notification -> verify chip disappears Test: atest SingleNotificationChipInteractorTest StatusBarNotificationChipsInteractorTest Change-Id: I3f47da63beaeae93b2b11c8ae1be516e2474cf11
Loading
Please register or sign in to comment