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);
         }
     }