Merge changes from topic "bubble_settings_wooo" into rvc-dev
* changes: Changes to enable bubble settings CTS Notification Bubble Button Make bubble settings a pref with an int rather than a bool
This commit is contained in:
committed by
Android (Google) Code Review
commit
c026d54cd7
@@ -78,10 +78,9 @@ interface INotificationManager
|
||||
boolean shouldHideSilentStatusIcons(String callingPkg);
|
||||
void setHideSilentStatusIcons(boolean hide);
|
||||
|
||||
void setBubblesAllowed(String pkg, int uid, boolean allowed);
|
||||
void setBubblesAllowed(String pkg, int uid, int bubblePreference);
|
||||
boolean areBubblesAllowed(String pkg);
|
||||
boolean areBubblesAllowedForPackage(String pkg, int uid);
|
||||
boolean hasUserApprovedBubblesForPackage(String pkg, int uid);
|
||||
int getBubblePreferenceForPackage(String pkg, int uid);
|
||||
|
||||
void createNotificationChannelGroups(String pkg, in ParceledListSlice channelGroupList);
|
||||
void createNotificationChannels(String pkg, in ParceledListSlice channelsList);
|
||||
|
||||
@@ -102,7 +102,7 @@ public final class NotificationChannel implements Parcelable {
|
||||
private static final String ATT_FG_SERVICE_SHOWN = "fgservice";
|
||||
private static final String ATT_GROUP = "group";
|
||||
private static final String ATT_BLOCKABLE_SYSTEM = "blockable_system";
|
||||
private static final String ATT_ALLOW_BUBBLE = "can_bubble";
|
||||
private static final String ATT_ALLOW_BUBBLE = "allow_bubble";
|
||||
private static final String ATT_ORIG_IMP = "orig_imp";
|
||||
private static final String ATT_PARENT_CHANNEL = "parent";
|
||||
private static final String ATT_CONVERSATION_ID = "conv_id";
|
||||
@@ -168,7 +168,7 @@ public final class NotificationChannel implements Parcelable {
|
||||
NotificationManager.IMPORTANCE_UNSPECIFIED;
|
||||
private static final boolean DEFAULT_DELETED = false;
|
||||
private static final boolean DEFAULT_SHOW_BADGE = true;
|
||||
private static final boolean DEFAULT_ALLOW_BUBBLE = true;
|
||||
private static final boolean DEFAULT_ALLOW_BUBBLE = false;
|
||||
|
||||
@UnsupportedAppUsage
|
||||
private String mId;
|
||||
@@ -545,15 +545,8 @@ public final class NotificationChannel implements Parcelable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether notifications posted to this channel can appear outside of the notification
|
||||
* shade, floating over other apps' content as a bubble.
|
||||
*
|
||||
* <p>This value will be ignored for channels that aren't allowed to pop on screen (that is,
|
||||
* channels whose {@link #getImportance() importance} is <
|
||||
* {@link NotificationManager#IMPORTANCE_HIGH}.</p>
|
||||
*
|
||||
* <p>Only modifiable before the channel is submitted to
|
||||
* * {@link NotificationManager#createNotificationChannel(NotificationChannel)}.</p>
|
||||
* As of Android 11 this value is no longer respected.
|
||||
* @see #canBubble()
|
||||
* @see Notification#getBubbleMetadata()
|
||||
*/
|
||||
public void setAllowBubbles(boolean allowBubbles) {
|
||||
@@ -702,8 +695,10 @@ public final class NotificationChannel implements Parcelable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether notifications posted to this channel can display outside of the notification
|
||||
* shade, in a floating window on top of other apps.
|
||||
* Returns whether notifications posted to this channel are allowed to display outside of the
|
||||
* notification shade, in a floating window on top of other apps.
|
||||
*
|
||||
* @see Notification#getBubbleMetadata()
|
||||
*/
|
||||
public boolean canBubble() {
|
||||
return mAllowBubbles;
|
||||
|
||||
@@ -452,6 +452,19 @@ public class NotificationManager {
|
||||
*/
|
||||
public static final int IMPORTANCE_MAX = 5;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public static final int BUBBLE_PREFERENCE_NONE = 0;
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public static final int BUBBLE_PREFERENCE_ALL = 1;
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public static final int BUBBLE_PREFERENCE_SELECTED = 2;
|
||||
|
||||
@UnsupportedAppUsage
|
||||
private static INotificationManager sService;
|
||||
|
||||
@@ -1213,7 +1226,7 @@ public class NotificationManager {
|
||||
|
||||
|
||||
/**
|
||||
* Sets whether notifications posted by this app can appear outside of the
|
||||
* Gets whether all notifications posted by this app can appear outside of the
|
||||
* notification shade, floating over other apps' content.
|
||||
*
|
||||
* <p>This value will be ignored for notifications that are posted to channels that do not
|
||||
|
||||
@@ -77,7 +77,7 @@ interface IStatusBarService
|
||||
void onNotificationSmartReplySent(in String key, in int replyIndex, in CharSequence reply,
|
||||
in int notificationLocation, boolean modifiedBeforeSending);
|
||||
void onNotificationSettingsViewed(String key);
|
||||
void onNotificationBubbleChanged(String key, boolean isBubble);
|
||||
void onNotificationBubbleChanged(String key, boolean isBubble, int flags);
|
||||
void onBubbleNotificationSuppressionChanged(String key, boolean isSuppressed);
|
||||
void grantInlineReplyUriPermission(String key, in Uri uri, in UserHandle user, String packageName);
|
||||
void clearInlineReplyUriPermissions(String key);
|
||||
|
||||
Reference in New Issue
Block a user