From 813fc2af2c7d91fce2504ec1cc26bd7bda2e97ac Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Wed, 7 Apr 2021 10:34:46 -0700 Subject: API feedback: make bubble pref an int def Test: TH Bug: 184204590 Change-Id: Ie8b138e8686dc8be89dbb9ef0698552040e89c8d --- core/java/android/app/NotificationManager.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/java/android/app/NotificationManager.java b/core/java/android/app/NotificationManager.java index f0d580f066d8..da03a3da820a 100644 --- a/core/java/android/app/NotificationManager.java +++ b/core/java/android/app/NotificationManager.java @@ -419,6 +419,14 @@ public class NotificationManager { @Retention(RetentionPolicy.SOURCE) public @interface Importance {} + /** @hide */ + @IntDef(prefix = { "BUBBLE_PREFERENCE_" }, value = { + BUBBLE_PREFERENCE_NONE, BUBBLE_PREFERENCE_SELECTED, + BUBBLE_PREFERENCE_ALL + }) + @Retention(RetentionPolicy.SOURCE) + public @interface BubblePreference {} + /** * Activity Action: Launch an Automatic Zen Rule configuration screen *

@@ -1379,7 +1387,7 @@ public class NotificationManager { * @see Notification#getBubbleMetadata() * @return the users' bubble preference for the app. */ - public int getBubblePreference() { + public @BubblePreference int getBubblePreference() { INotificationManager service = getService(); try { return service.getBubblePreferenceForPackage(mContext.getPackageName(), -- cgit v1.2.3-59-g8ed1b