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

Commit 6adfd86c authored by Griff Hazen's avatar Griff Hazen Committed by Android Git Automerger
Browse files

am 4e795ebe: am 0ff811db: Merge "Add local-only option to Notification (using...

am 4e795ebe: am 0ff811db: Merge "Add local-only option to Notification (using flag)" into klp-modular-dev

* commit '4e795ebe':
  Add local-only option to Notification (using flag)
parents 7b0e2827 4e795ebe
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4231,6 +4231,7 @@ package android.app {
    field public static final int FLAG_FOREGROUND_SERVICE = 64; // 0x40
    field public static final deprecated int FLAG_HIGH_PRIORITY = 128; // 0x80
    field public static final int FLAG_INSISTENT = 4; // 0x4
    field public static final int FLAG_LOCAL_ONLY = 256; // 0x100
    field public static final int FLAG_NO_CLEAR = 32; // 0x20
    field public static final int FLAG_ONGOING_EVENT = 2; // 0x2
    field public static final int FLAG_ONLY_ALERT_ONCE = 8; // 0x8
@@ -4316,6 +4317,7 @@ package android.app {
    method public android.app.Notification.Builder setFullScreenIntent(android.app.PendingIntent, boolean);
    method public android.app.Notification.Builder setLargeIcon(android.graphics.Bitmap);
    method public android.app.Notification.Builder setLights(int, int, int);
    method public android.app.Notification.Builder setLocalOnly(boolean);
    method public android.app.Notification.Builder setNumber(int);
    method public android.app.Notification.Builder setOngoing(boolean);
    method public android.app.Notification.Builder setOnlyAlertOnce(boolean);
+19 −2
Original line number Diff line number Diff line
@@ -351,6 +351,13 @@ public class Notification implements Parcelable
     */
    public static final int FLAG_HIGH_PRIORITY      = 0x00000080;

    /**
     * Bit to be bitswise-ored into the {@link #flags} field that should be
     * set if this notification is relevant to the current device only
     * and it is not recommended that it bridge to other devices.
     */
    public static final int FLAG_LOCAL_ONLY         = 0x00000100;

    public int flags;

    /** @hide */
@@ -1597,6 +1604,17 @@ public class Notification implements Parcelable
            return this;
        }

        /**
         * Set whether or not this notification should not bridge to other devices.
         *
         * <p>Some notifications can be bridged to other devices for remote display.
         * This hint can be set to recommend this notification not be bridged.
         */
        public Builder setLocalOnly(boolean localOnly) {
            setFlag(FLAG_LOCAL_ONLY, localOnly);
            return this;
        }

        /**
         * Set which notification properties will be inherited from system defaults.
         * <p>
@@ -1996,8 +2014,7 @@ public class Notification implements Parcelable
     * An object that can apply a rich notification style to a {@link Notification.Builder}
     * object.
     */
    public static abstract class Style
    {
    public static abstract class Style {
        private CharSequence mBigContentTitle;
        private CharSequence mSummaryText = null;
        private boolean mSummaryTextSet = false;