[SB][Notif] Maintain notification chip state for a timeout period.
The `flatMapLatest` that collects all the individual notification chip flows means that the flows stop & immediately restart collection each time the list of notification chips changes. This can cause problems, like the `appVisibility` flow starting UID observation multiple times. This CL uses a `stopTimeoutMillis` on the notification chips StateFlow so that all the flow values are maintained for the brief period where flatMapLatest stops then restarts collection. Fixes: 396471436 Bug: 364653005 Flag: com.android.systemui.status_bar_notification_chips Test: trigger a bunch of different notification chips, opening & closing their apps -> dump `StatusBarChips` log and verify it's not spammy Change-Id: Idcf4777c896ac45af5d157409f2560942384369e
Loading
Please register or sign in to comment