Loading api/current.txt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -5552,6 +5552,7 @@ package android.app { method @Deprecated public android.app.Notification.Builder setDefaults(int); method @Deprecated public android.app.Notification.Builder setDefaults(int); method @NonNull public android.app.Notification.Builder setDeleteIntent(android.app.PendingIntent); method @NonNull public android.app.Notification.Builder setDeleteIntent(android.app.PendingIntent); method @NonNull public android.app.Notification.Builder setExtras(android.os.Bundle); method @NonNull public android.app.Notification.Builder setExtras(android.os.Bundle); method @NonNull public android.app.Notification.Builder setFlag(int, boolean); method @NonNull public android.app.Notification.Builder setFullScreenIntent(android.app.PendingIntent, boolean); method @NonNull public android.app.Notification.Builder setFullScreenIntent(android.app.PendingIntent, boolean); method @NonNull public android.app.Notification.Builder setGroup(String); method @NonNull public android.app.Notification.Builder setGroup(String); method @NonNull public android.app.Notification.Builder setGroupAlertBehavior(int); method @NonNull public android.app.Notification.Builder setGroupAlertBehavior(int); core/java/android/app/Notification.java +14 −2 Original line number Original line Diff line number Diff line Loading @@ -628,6 +628,13 @@ public class Notification implements Parcelable */ */ public static final int FLAG_BUBBLE = 0x00001000; public static final int FLAG_BUBBLE = 0x00001000; /** @hide */ @IntDef({FLAG_SHOW_LIGHTS, FLAG_ONGOING_EVENT, FLAG_INSISTENT, FLAG_ONLY_ALERT_ONCE, FLAG_AUTO_CANCEL, FLAG_NO_CLEAR, FLAG_FOREGROUND_SERVICE, FLAG_HIGH_PRIORITY, FLAG_LOCAL_ONLY, FLAG_GROUP_SUMMARY, FLAG_AUTOGROUP_SUMMARY, FLAG_BUBBLE}) @Retention(RetentionPolicy.SOURCE) public @interface NotificationFlags{}; public int flags; public int flags; /** @hide */ /** @hide */ Loading Loading @@ -4537,10 +4544,15 @@ public class Notification implements Parcelable } } /** /** * @hide * Set the value for a notification flag * * @param mask Bit mask of the flag * @param value Status (on/off) of the flag * * @return The same Builder. */ */ @NonNull @NonNull public Builder setFlag(int mask, boolean value) { public Builder setFlag(@NotificationFlags int mask, boolean value) { if (value) { if (value) { mN.flags |= mask; mN.flags |= mask; } else { } else { Loading Loading
api/current.txt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -5552,6 +5552,7 @@ package android.app { method @Deprecated public android.app.Notification.Builder setDefaults(int); method @Deprecated public android.app.Notification.Builder setDefaults(int); method @NonNull public android.app.Notification.Builder setDeleteIntent(android.app.PendingIntent); method @NonNull public android.app.Notification.Builder setDeleteIntent(android.app.PendingIntent); method @NonNull public android.app.Notification.Builder setExtras(android.os.Bundle); method @NonNull public android.app.Notification.Builder setExtras(android.os.Bundle); method @NonNull public android.app.Notification.Builder setFlag(int, boolean); method @NonNull public android.app.Notification.Builder setFullScreenIntent(android.app.PendingIntent, boolean); method @NonNull public android.app.Notification.Builder setFullScreenIntent(android.app.PendingIntent, boolean); method @NonNull public android.app.Notification.Builder setGroup(String); method @NonNull public android.app.Notification.Builder setGroup(String); method @NonNull public android.app.Notification.Builder setGroupAlertBehavior(int); method @NonNull public android.app.Notification.Builder setGroupAlertBehavior(int);
core/java/android/app/Notification.java +14 −2 Original line number Original line Diff line number Diff line Loading @@ -628,6 +628,13 @@ public class Notification implements Parcelable */ */ public static final int FLAG_BUBBLE = 0x00001000; public static final int FLAG_BUBBLE = 0x00001000; /** @hide */ @IntDef({FLAG_SHOW_LIGHTS, FLAG_ONGOING_EVENT, FLAG_INSISTENT, FLAG_ONLY_ALERT_ONCE, FLAG_AUTO_CANCEL, FLAG_NO_CLEAR, FLAG_FOREGROUND_SERVICE, FLAG_HIGH_PRIORITY, FLAG_LOCAL_ONLY, FLAG_GROUP_SUMMARY, FLAG_AUTOGROUP_SUMMARY, FLAG_BUBBLE}) @Retention(RetentionPolicy.SOURCE) public @interface NotificationFlags{}; public int flags; public int flags; /** @hide */ /** @hide */ Loading Loading @@ -4537,10 +4544,15 @@ public class Notification implements Parcelable } } /** /** * @hide * Set the value for a notification flag * * @param mask Bit mask of the flag * @param value Status (on/off) of the flag * * @return The same Builder. */ */ @NonNull @NonNull public Builder setFlag(int mask, boolean value) { public Builder setFlag(@NotificationFlags int mask, boolean value) { if (value) { if (value) { mN.flags |= mask; mN.flags |= mask; } else { } else { Loading