Merge "[Ongoing Call] Remove #onEntryCleanUp override." into sc-v2-dev

This commit is contained in:
TreeHugger Robot
2021-10-05 02:30:08 +00:00
committed by Android (Google) Code Review
2 changed files with 0 additions and 21 deletions

View File

@@ -108,16 +108,7 @@ class OngoingCallController @Inject constructor(
}
}
// Fix for b/199600334
override fun onEntryCleanUp(entry: NotificationEntry) {
removeChipIfNeeded(entry)
}
override fun onEntryRemoved(entry: NotificationEntry, reason: Int) {
removeChipIfNeeded(entry)
}
private fun removeChipIfNeeded(entry: NotificationEntry) {
if (entry.sbn.key == callNotificationInfo?.key) {
removeChip()
}

View File

@@ -224,18 +224,6 @@ class OngoingCallControllerTest : SysuiTestCase() {
verify(mockOngoingCallListener).onOngoingCallStateChanged(anyBoolean())
}
/** Regression test for b/201097913. */
@Test
fun onEntryCleanUp_callNotifAddedThenRemoved_listenerNotified() {
val ongoingCallNotifEntry = createOngoingCallNotifEntry()
notifCollectionListener.onEntryAdded(ongoingCallNotifEntry)
reset(mockOngoingCallListener)
notifCollectionListener.onEntryCleanUp(ongoingCallNotifEntry)
verify(mockOngoingCallListener).onOngoingCallStateChanged(anyBoolean())
}
/** Regression test for b/188491504. */
@Test
fun onEntryRemoved_removedNotifHasSameKeyAsAddedNotif_listenerNotified() {