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

Skip to content
Commit 7a32c912 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[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
parent 4d0fcaf7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment