Fix the cancel from overflow test
There's a bug in S where if you cancel all the bubbles
from an app and there isn't anything else in the overflow
from other apps, then we'll reload things from XML.
I'm not super confident there won't be other side effects
from my fix so I want to do that in v2.
This modification in CtsVerifier test ensures the test
works as it should.
Test: flash wipe your device and perform the CtsVerifier
bubbles tests
Bug: 193380534
Change-Id: I3531f2ffc0cfb74b206b88f92431c2799fac338c
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/notifications/BubblesVerifierActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/notifications/BubblesVerifierActivity.java
index 1aa26b2..5701c90 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/notifications/BubblesVerifierActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/notifications/BubblesVerifierActivity.java
@@ -776,13 +776,15 @@
@Override
public void performTestAction() {
- mNotificationManager.cancelAll();
-
- // but post one more so the tester can actually access the overflow
+ // Make sure one is a bubble
Notification.Builder builder = getConversationNotif(getTestTitle());
Notification.BubbleMetadata metadata = getBubbleBuilder().build();
builder.setBubbleMetadata(metadata);
mNotificationManager.notify(NOTIFICATION_ID, builder.build());
+
+ // Cancel the others
+ mNotificationManager.cancel(NOTIFICATION_ID + 1);
+ mNotificationManager.cancel(NOTIFICATION_ID + 2);
}
}