summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/Notification.java
diff options
context:
space:
mode:
authorGriff Hazen <griff@google.com>2014-02-11 21:40:48 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-11 21:40:48 +0000
commit6adfd86ca94f3eabb93fb1b4a0b9b0ea50895dcd (patch)
tree1247ba6d622badbaf3c41cfcfe28095c839f6d2e /core/java/android/app/Notification.java
parent7b0e2827153752ae51c3ae80746e42ee185e7358 (diff)
parent4e795ebe1783623a28a988f77b4f0f11d54e73be (diff)
downloadframeworks_base-6adfd86ca94f3eabb93fb1b4a0b9b0ea50895dcd.zip
frameworks_base-6adfd86ca94f3eabb93fb1b4a0b9b0ea50895dcd.tar.gz
frameworks_base-6adfd86ca94f3eabb93fb1b4a0b9b0ea50895dcd.tar.bz2
am 4e795ebe: am 0ff811db: Merge "Add local-only option to Notification (using flag)" into klp-modular-dev
* commit '4e795ebe1783623a28a988f77b4f0f11d54e73be': Add local-only option to Notification (using flag)
Diffstat (limited to 'core/java/android/app/Notification.java')
-rw-r--r--core/java/android/app/Notification.java21
1 files changed, 19 insertions, 2 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index e2ea763..7926595 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -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 */
@@ -1598,6 +1605,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
@@ -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;