From a64a11b1f10221a99211811c35bac01e7ee0130d Mon Sep 17 00:00:00 2001 From: Caitlin Cassidy Date: Wed, 21 Apr 2021 18:11:28 +0000 Subject: [PATCH] [Ongoing Call] Add a temporary workaround for b/178406514. Bug: 183229367 Test: atest and manual Change-Id: I062a0c6f08ed3b4c9eae642fc99ef0566916c722 --- .../phone/ongoingcall/OngoingCallController.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ongoingcall/OngoingCallController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ongoingcall/OngoingCallController.kt index 96473c2a961ca..51bb6434e61cf 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ongoingcall/OngoingCallController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ongoingcall/OngoingCallController.kt @@ -52,6 +52,18 @@ class OngoingCallController @Inject constructor( private val mListeners: MutableList = mutableListOf() private val notifListener = object : NotifCollectionListener { + // Temporary workaround for b/178406514 for testing purposes. + // + // b/178406514 means that posting an incoming call notif then updating it to an ongoing call + // notif does not work (SysUI never receives the update). This workaround allows us to + // trigger the ongoing call chip when an ongoing call notif is *added* rather than + // *updated*, allowing us to test the chip. + // + // TODO(b/183229367): Remove this function override when b/178406514 is fixed. + override fun onEntryAdded(entry: NotificationEntry) { + onEntryUpdated(entry) + } + override fun onEntryUpdated(entry: NotificationEntry) { if (isOngoingCallNotification(entry)) { ongoingCallInfo = OngoingCallInfo(