From 53162c13a33fdce5a8d66c64c7e57caec0d95d8e Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Tue, 22 Oct 2019 17:12:59 -0700 Subject: Add Bubble as an option in NotificationInfo longpress menu - If the content is able to bubble, the bubble option will show in the menu - If that notif is able to bubble (either via bubble metadata or via notification contents), then show the menu - Adds tests for the bubble menu option, also tests selection for alert and silence buttons; removes unused test code Test: atest NotificationInfoTest NotificationGutsManagerTest Test: manual - post a bubble with bubbles test app, longpress on notif and demote it via menu => bubble is gone - long press on notif and promote it via menu => bubble is created Bug: 138116133 Bug: 143173197 Change-Id: I2f2767ec12c49e5d3a8d2a7b86db5457d062275c --- core/java/android/app/Notification.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core/java/android') diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 2931f33e4cc4..fce74496d9c4 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -3203,6 +3203,14 @@ public class Notification implements Parcelable return mBubbleMetadata; } + /** + * Sets the {@link BubbleMetadata} for this notification. + * @hide + */ + public void setBubbleMetadata(BubbleMetadata data) { + mBubbleMetadata = data; + } + /** * Returns whether the platform is allowed (by the app developer) to generate contextual actions * for this notification. -- cgit v1.2.3