[SB][Call chip] Listen to ActiveNotificationsInteractor for call info.
The current OngoingCallController listens to
NotifCollectionListener#onEntryUpdated to determine what call
notifications are active and when to show the ongoing call chip. This
has two problems:
1) #onEntryUpdated does not take users into account. If you start a call
on User 1, then switch to User 2, User 2 would still see the call
chip even though there's no call notification shown to User 2. User 2
has no way to stop the call either, and User 2 can't tap the chip
because the intent isn't valid for this user.
2) For b/354930838, we want to update the call chip to use
`Notification.smallIcon` as the icon in the chip. However,
#onEntryUpdated is invoked before we've actually inflated the small
icon, so the chip would show no icon (see b/355288215).
Listening to ActivteNotificationsInteractor solves both these problems:
1) The interactor automatically filters the notification list to just
notifications for the current user.
2) The interactor only emits notifications that are currently presented
to the user in the shade, which means we know we've already inflated
the icon.
Bug: 328584859
Flag: com.android.systemui.status_bar_use_repos_for_call_chip
Test: Start ongoing call on one user, switch to another user -> verify
chip no longer shows up
Test: Start ongoing call in one app, then start another call in a second
app -> verify chip still shows fist app call time. End first call ->
verify chip starts showing second app call time.
Test: General smoke test of ongoing call CUJs
Test: Verify above with status_bar_screen_sharing_chips flag both
disabled and enabled
Test: atest ActiveNotificationsInteractorTest
OngoingCallControllerViaListenerTest OngoingCallControllerViaRepoTest
Change-Id: I5615cea679b4cff075390d1da4c9a918419fc76a
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig
index 1f1495a..9df739c 100644
--- a/packages/SystemUI/aconfig/systemui.aconfig
+++ b/packages/SystemUI/aconfig/systemui.aconfig
@@ -392,6 +392,17 @@
}
flag {
+ name: "status_bar_use_repos_for_call_chip"
+ namespace: "systemui"
+ description: "Use repositories as the source of truth for call notifications shown as a chip in"
+ "the status bar"
+ bug: "328584859"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
+
+flag {
name: "compose_bouncer"
namespace: "systemui"
description: "Use the new compose bouncer in SystemUI"