commit | bb9392d3c3294f26093233e5f3e280759fafd48b | [log] [tgz] |
---|---|---|
author | Julia Reynolds <juliacr@google.com> | Thu Dec 09 12:23:38 2021 -0500 |
committer | Julia Reynolds <juliacr@google.com> | Thu Dec 09 12:23:38 2021 -0500 |
tree | dbb416358e5b27207e918a3aef45791585ec7f37 | |
parent | 51df5398a002a750eabaadd5af74c97f253f17d4 [diff] |
Make sure listener gets callback when canceling notifications Test: this Bug: 207548455 Change-Id: Id132c540d738b625226eae7b509390c61802f820
diff --git a/tests/app/src/android/app/cts/NotificationManagerTest.java b/tests/app/src/android/app/cts/NotificationManagerTest.java index 9f905b6..d60235b 100644 --- a/tests/app/src/android/app/cts/NotificationManagerTest.java +++ b/tests/app/src/android/app/cts/NotificationManagerTest.java
@@ -3560,7 +3560,8 @@ } mListener.cancelNotifications(new String[]{ sbn.getKey() }); - if (!checkNotificationExistence(notificationId, /*shouldExist=*/ false)) { + if (getCancellationReason(sbn.getKey()) + != NotificationListenerService.REASON_LISTENER_CANCEL) { fail("Failed to cancel notification id=" + notificationId); } }