summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorJulia Reynolds <juliacr@google.com>2021-02-27 15:34:34 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-02-27 15:34:34 +0000
commit5db5a6ae406bfef2099982d1cbef6f87c4127b65 (patch)
tree89e36bc89dc55a73d0e5fadd79fb07ea319af960 /core/java/android
parentb8407d691cccf3ae946b2530c86815e6a477b385 (diff)
parent7c9fbcc6787df792275dd871a7f0781e2befce8f (diff)
Merge "Adds an NLS api for telling the OS what notifs types they bridge" into sc-dev
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/service/notification/NotificationListenerService.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java
index 73e66d0212fa..7aa5bbc930fb 100644
--- a/core/java/android/service/notification/NotificationListenerService.java
+++ b/core/java/android/service/notification/NotificationListenerService.java
@@ -85,6 +85,10 @@ import java.util.Objects;
* android:name="android.service.notification.default_filter_types"
* android:value="1,2">
* &lt;/meta-data>
+ * &lt;meta-data
+ * android:name="android.service.notification.disabled_filter_types"
+ * android:value="2">
+ * &lt;/meta-data>
* &lt;/service></pre>
*
* <p>The service should wait for the {@link #onListenerConnected()} event
@@ -123,6 +127,19 @@ public abstract class NotificationListenerService extends Service {
= "android.service.notification.default_filter_types";
/**
+ * The name of the {@code meta-data} tag containing a comma separated list of default
+ * integer notification types that this listener never wants to receive. See
+ * {@link #FLAG_FILTER_TYPE_ONGOING},
+ * {@link #FLAG_FILTER_TYPE_CONVERSATIONS}, {@link #FLAG_FILTER_TYPE_ALERTING),
+ * and {@link #FLAG_FILTER_TYPE_SILENT}.
+ * <p>Types provided in this list will appear as 'off' and 'disabled' in the user interface,
+ * so users don't enable a type that the listener will never bridge to their paired devices.</p>
+ *
+ */
+ public static final String META_DATA_DISABLED_FILTER_TYPES
+ = "android.service.notification.disabled_filter_types";
+
+ /**
* {@link #getCurrentInterruptionFilter() Interruption filter} constant -
* Normal interruption filter.
*/