Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4878a00 authored by cncn's avatar cncn Committed by android-build-merger
Browse files

Merge "Make Notification.Builder.SetFlag public" am: c8bd4aec am: dca2d456

am: 689403c3

Change-Id: I8e8d117020327593833536ae7ee43e5b94899c9e
parents 2ff5bbe8 689403c3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5616,6 +5616,7 @@ package android.app {
    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 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 setGroup(String);
    method @NonNull public android.app.Notification.Builder setGroupAlertBehavior(int);
+14 −2
Original line number Diff line number Diff line
@@ -627,6 +627,13 @@ public class Notification implements Parcelable
     */
    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;

    /** @hide */
@@ -4545,10 +4552,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
        public Builder setFlag(int mask, boolean value) {
        public Builder setFlag(@NotificationFlags int mask, boolean value) {
            if (value) {
                mN.flags |= mask;
            } else {