다음을 통해 공유


DevicePolicyManager.SetPermittedCrossProfileNotificationListeners 메서드

정의

관리되는 프로필의 프로필 소유자가 기본 사용자에서 을 사용하여 android.service.notification.NotificationListenerService 관리되는 프로필의 알림을 볼 수 있는 패키지를 설정하기 위해 호출합니다.

[Android.Runtime.Register("setPermittedCrossProfileNotificationListeners", "(Landroid/content/ComponentName;Ljava/util/List;)Z", "GetSetPermittedCrossProfileNotificationListeners_Landroid_content_ComponentName_Ljava_util_List_Handler", ApiSince=26)]
public virtual bool SetPermittedCrossProfileNotificationListeners (Android.Content.ComponentName admin, System.Collections.Generic.IList<string>? packageList);
[<Android.Runtime.Register("setPermittedCrossProfileNotificationListeners", "(Landroid/content/ComponentName;Ljava/util/List;)Z", "GetSetPermittedCrossProfileNotificationListeners_Landroid_content_ComponentName_Ljava_util_List_Handler", ApiSince=26)>]
abstract member SetPermittedCrossProfileNotificationListeners : Android.Content.ComponentName * System.Collections.Generic.IList<string> -> bool
override this.SetPermittedCrossProfileNotificationListeners : Android.Content.ComponentName * System.Collections.Generic.IList<string> -> bool

매개 변수

admin
ComponentName

DeviceAdminReceiver 이 요청과 연결된 요청입니다.

packageList
IList<String>

허용 목록에 대한 패키지 이름 목록

반환

제한을 설정하는 데 성공하면 true입니다. 관리되는 프로필 외부에서 호출되면 실패합니다.

특성

설명

관리되는 프로필의 프로필 소유자가 기본 사용자에서 을 사용하여 android.service.notification.NotificationListenerService 관리되는 프로필의 알림을 볼 수 있는 패키지를 설정하기 위해 호출합니다. 기본적으로 모든 패키지는 이 정책에서 허용됩니다. 패키지가 0개 이상 추가되면 목록에 없고 시스템의 일부가 아닌 기본 사용자에 설치된 알림 수신기는 관리되는 프로필 알림에 대한 이벤트를 수신하지 않습니다.

목록에 대한 값을 사용하여 null 를 호출하면 모든 알림 수신기 서비스를 사용할 수 있도록 제한이 비활성화됩니다. 빈 목록으로 를 호출하면 시스템 자체 알림 수신기를 제외한 모든 알림 수신기가 비활성화됩니다. 시스템 알림 수신기 서비스는 항상 사용자가 사용할 수 있습니다.

디바이스 또는 프로필 소유자가 사용자의 알림 수신기가 해당 사용자의 알림을 보지 못하도록 하려면 해당 서비스가 대신 실행되지 않도록 해야 합니다(예: 를 통해 #setApplicationHidden(ComponentName, String, boolean)).

에 대한 Java 설명서입니다 android.app.admin.DevicePolicyManager.setPermittedCrossProfileNotificationListeners(android.content.ComponentName, java.util.List<java.lang.String>).

이 페이지의 일부는 만들고 공유하며 에 설명된 용어에 따라 사용되는 작업을 기반으로 수정됩니다.

적용 대상