From 604843bda67a5c576eab5ecfacfc2b8d3b89ba71 Mon Sep 17 00:00:00 2001
From: Benjamin Miller
Date: Tue, 27 Feb 2018 11:29:16 +0000
Subject: Docs: added a note about about notification listeners and work
profiles.
Stated that NotificationListenerService is ignored when running in the work profile.
A NotificationListenerService might not see notifications from the work profile if an IT admin blocks personal apps.
Staged at:
http://go/dac-stage/reference/android/service/notification/NotificationListenerService.html
Test: Run make ds-docs and review
Bug: 67907973
Change-Id: Ie37cf8f576dc228e6c8ba074f389595fdebcdf9c
---
.../android/service/notification/NotificationListenerService.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java
index 422e36baee70..0fac58a55aca 100644
--- a/core/java/android/service/notification/NotificationListenerService.java
+++ b/core/java/android/service/notification/NotificationListenerService.java
@@ -85,7 +85,10 @@ import java.util.List;
* or after {@link #onListenerDisconnected()}.
*
* Notification listeners cannot get notification access or be bound by the system on
- * {@link ActivityManager#isLowRamDevice() low ram} devices
+ * {@linkplain ActivityManager#isLowRamDevice() low-RAM} devices. The system also ignores
+ * notification listeners running in a work profile. A
+ * {@link android.app.admin.DevicePolicyManager} might block notifications originating from a work
+ * profile.
*/
public abstract class NotificationListenerService extends Service {
--
cgit v1.2.3-59-g8ed1b