Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -27530,6 +27530,7 @@ package android.service.notification { field public static final int INTERRUPTION_FILTER_ALL = 1; // 0x1 field public static final int INTERRUPTION_FILTER_NONE = 3; // 0x3 field public static final int INTERRUPTION_FILTER_PRIORITY = 2; // 0x2 field public static final int INTERRUPTION_FILTER_UNKNOWN = 0; // 0x0 field public static final java.lang.String SERVICE_INTERFACE = "android.service.notification.NotificationListenerService"; } api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -29171,6 +29171,7 @@ package android.service.notification { field public static final int INTERRUPTION_FILTER_ALL = 1; // 0x1 field public static final int INTERRUPTION_FILTER_NONE = 3; // 0x3 field public static final int INTERRUPTION_FILTER_PRIORITY = 2; // 0x2 field public static final int INTERRUPTION_FILTER_UNKNOWN = 0; // 0x0 field public static final java.lang.String SERVICE_INTERFACE = "android.service.notification.NotificationListenerService"; field public static final int TRIM_FULL = 0; // 0x0 field public static final int TRIM_LIGHT = 1; // 0x1 core/java/android/service/notification/NotificationListenerService.java +12 −3 Original line number Diff line number Diff line Loading @@ -77,6 +77,14 @@ public abstract class NotificationListenerService extends Service { */ public static final int INTERRUPTION_FILTER_NONE = 3; /** {@link #getCurrentInterruptionFilter() Interruption filter} constant - returned when * the value is unavailable for any reason. For example, before the notification listener * is connected. * * {@see #onListenerConnected()} */ public static final int INTERRUPTION_FILTER_UNKNOWN = 0; /** {@link #getCurrentListenerHints() Listener hints} constant - the primary device UI * should disable notification sound, vibrating and other visual or aural effects. * This does not change the interruption filter, only the effects. **/ Loading Loading @@ -473,15 +481,16 @@ public abstract class NotificationListenerService extends Service { * <p> * Listen for updates using {@link #onInterruptionFilterChanged(int)}. * * @return One of the INTERRUPTION_FILTER_ constants, or 0 on errors. * @return One of the INTERRUPTION_FILTER_ constants, or INTERRUPTION_FILTER_UNKNOWN when * unavailable. */ public final int getCurrentInterruptionFilter() { if (!isBound()) return 0; if (!isBound()) return INTERRUPTION_FILTER_UNKNOWN; try { return getNotificationInterface().getInterruptionFilterFromListener(mWrapper); } catch (android.os.RemoteException ex) { Log.v(TAG, "Unable to contact notification manager", ex); return 0; return INTERRUPTION_FILTER_UNKNOWN; } } Loading services/core/java/com/android/server/notification/NotificationManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -209,7 +209,7 @@ public class NotificationManagerService extends SystemService { private final ArraySet<ManagedServiceInfo> mListenersDisablingEffects = new ArraySet<>(); private ComponentName mEffectsSuppressor; private int mListenerHints; // right now, all hints are global private int mInterruptionFilter; // current ZEN mode as communicated to listeners private int mInterruptionFilter = NotificationListenerService.INTERRUPTION_FILTER_UNKNOWN; // for enabling and disabling notification pulse behavior private boolean mScreenOn = true; Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -27530,6 +27530,7 @@ package android.service.notification { field public static final int INTERRUPTION_FILTER_ALL = 1; // 0x1 field public static final int INTERRUPTION_FILTER_NONE = 3; // 0x3 field public static final int INTERRUPTION_FILTER_PRIORITY = 2; // 0x2 field public static final int INTERRUPTION_FILTER_UNKNOWN = 0; // 0x0 field public static final java.lang.String SERVICE_INTERFACE = "android.service.notification.NotificationListenerService"; }
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -29171,6 +29171,7 @@ package android.service.notification { field public static final int INTERRUPTION_FILTER_ALL = 1; // 0x1 field public static final int INTERRUPTION_FILTER_NONE = 3; // 0x3 field public static final int INTERRUPTION_FILTER_PRIORITY = 2; // 0x2 field public static final int INTERRUPTION_FILTER_UNKNOWN = 0; // 0x0 field public static final java.lang.String SERVICE_INTERFACE = "android.service.notification.NotificationListenerService"; field public static final int TRIM_FULL = 0; // 0x0 field public static final int TRIM_LIGHT = 1; // 0x1
core/java/android/service/notification/NotificationListenerService.java +12 −3 Original line number Diff line number Diff line Loading @@ -77,6 +77,14 @@ public abstract class NotificationListenerService extends Service { */ public static final int INTERRUPTION_FILTER_NONE = 3; /** {@link #getCurrentInterruptionFilter() Interruption filter} constant - returned when * the value is unavailable for any reason. For example, before the notification listener * is connected. * * {@see #onListenerConnected()} */ public static final int INTERRUPTION_FILTER_UNKNOWN = 0; /** {@link #getCurrentListenerHints() Listener hints} constant - the primary device UI * should disable notification sound, vibrating and other visual or aural effects. * This does not change the interruption filter, only the effects. **/ Loading Loading @@ -473,15 +481,16 @@ public abstract class NotificationListenerService extends Service { * <p> * Listen for updates using {@link #onInterruptionFilterChanged(int)}. * * @return One of the INTERRUPTION_FILTER_ constants, or 0 on errors. * @return One of the INTERRUPTION_FILTER_ constants, or INTERRUPTION_FILTER_UNKNOWN when * unavailable. */ public final int getCurrentInterruptionFilter() { if (!isBound()) return 0; if (!isBound()) return INTERRUPTION_FILTER_UNKNOWN; try { return getNotificationInterface().getInterruptionFilterFromListener(mWrapper); } catch (android.os.RemoteException ex) { Log.v(TAG, "Unable to contact notification manager", ex); return 0; return INTERRUPTION_FILTER_UNKNOWN; } } Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -209,7 +209,7 @@ public class NotificationManagerService extends SystemService { private final ArraySet<ManagedServiceInfo> mListenersDisablingEffects = new ArraySet<>(); private ComponentName mEffectsSuppressor; private int mListenerHints; // right now, all hints are global private int mInterruptionFilter; // current ZEN mode as communicated to listeners private int mInterruptionFilter = NotificationListenerService.INTERRUPTION_FILTER_UNKNOWN; // for enabling and disabling notification pulse behavior private boolean mScreenOn = true; Loading