summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorMady Mellor <madym@google.com>2019-10-22 17:12:59 -0700
committerMady Mellor <madym@google.com>2019-11-11 16:29:37 -0800
commit53162c13a33fdce5a8d66c64c7e57caec0d95d8e (patch)
treeffc51a9802000e5c5419ee385936c4ba2a9c56df /core/java/android
parentec3c03ea24f5b920651bbdba5e36222a414c3123 (diff)
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
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/Notification.java8
1 files changed, 8 insertions, 0 deletions
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
@@ -3204,6 +3204,14 @@ public class Notification implements Parcelable
}
/**
+ * 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.
*/