diff options
| author | 2025-03-11 12:14:45 +0000 | |
|---|---|---|
| committer | 2025-03-12 03:22:04 -0700 | |
| commit | 9f10b43f8b5d726389cb5304fab52e6cd947ab8c (patch) | |
| tree | b5039f423715a64f6d814753bba5aae916eb5d31 | |
| parent | c25bc7a09a5a8fe7d1978924c579b7b75b575a1e (diff) | |
[Flexiglass] Don't emit the same values from Set<HeadsUpRowKey> flows
Only emit from the Set<HeadsUpRowKey> flows if there is a change, to make
the binder's job easier when it is diffing for previous keys to generate
animation events.
Bug: 400691495
Flag: com.android.systemui.scene_container
Test: observe HUN intro/outro animations
Change-Id: I75f7cae9fd87b5d869d17976bf37ba06b6da26a3
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/HeadsUpNotificationInteractor.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/HeadsUpNotificationInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/HeadsUpNotificationInteractor.kt index cdbe0fd23a9a..8d1e61123fdd 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/HeadsUpNotificationInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/HeadsUpNotificationInteractor.kt @@ -81,7 +81,7 @@ constructor( if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) { flowOf(emptySet()) } else { - activeHeadsUpRows.map { it.map { (repo, _) -> repo }.toSet() } + activeHeadsUpRows.map { it.map { (repo, _) -> repo }.toSet() }.distinctUntilChanged() } } @@ -90,9 +90,9 @@ constructor( if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) { flowOf(emptySet()) } else { - activeHeadsUpRows.map { - it.filter { (_, isPinned) -> isPinned }.map { (repo, _) -> repo }.toSet() - } + activeHeadsUpRows + .map { it.filter { (_, isPinned) -> isPinned }.map { (repo, _) -> repo }.toSet() } + .distinctUntilChanged() // TODO(b/402428276) stop sending duplicate updates instead } } |