Make the tests permissive for Q
Add delay for testNotificationManagerBubblePolicy_flagForAppForeground

Test: atest NotificationManagerTest
Bug:136786013
Change-Id: Id647cb767fd7ffd13bd63a8e2ea2b309a1be8637
diff --git a/tests/app/src/android/app/cts/NotificationManagerTest.java b/tests/app/src/android/app/cts/NotificationManagerTest.java
index 697fe18..0c0b204 100644
--- a/tests/app/src/android/app/cts/NotificationManagerTest.java
+++ b/tests/app/src/android/app/cts/NotificationManagerTest.java
@@ -342,6 +342,11 @@
     private void cancelAndPoll(int id) {
         mNotificationManager.cancel(id);
 
+        try {
+            Thread.sleep(500);
+        } catch (InterruptedException ex) {
+            // pass
+        }
         if (!checkNotificationExistence(id, /*shouldExist=*/ false)) {
             fail("canceled notification was still alive, id=" + id);
         }