diff options
author | Griff Hazen <griff@google.com> | 2014-02-11 12:00:00 -0800 |
---|---|---|
committer | Griff Hazen <griff@google.com> | 2014-02-11 12:00:00 -0800 |
commit | dfcb0803bf2087b6f56592f1e2731bbaa070cb82 (patch) | |
tree | 10a2c78ff02916784ede9bf99afdfd45f9210dc9 /core/java/android/app/Notification.java | |
parent | 1b51c9cb96fe2a0818289857a016521eed1ec183 (diff) | |
download | frameworks_base-dfcb0803bf2087b6f56592f1e2731bbaa070cb82.zip frameworks_base-dfcb0803bf2087b6f56592f1e2731bbaa070cb82.tar.gz frameworks_base-dfcb0803bf2087b6f56592f1e2731bbaa070cb82.tar.bz2 |
Add local-only option to Notification (using flag)
Change-Id: Ic6d2f3b0cf06b58c0afa2af0fa6b245124424223
Diffstat (limited to 'core/java/android/app/Notification.java')
-rw-r--r-- | core/java/android/app/Notification.java | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index c63e586..1e96ebf 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -348,6 +348,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; /** @@ -1532,6 +1539,17 @@ public class Notification implements Parcelable } /** + * 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> * The value should be one or more of the following fields combined with @@ -1900,8 +1918,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; |