DevicePolicyManager.GetCrossProfilePackages(ComponentName) Method

Definition

Returns the set of package names that the admin has previously set as allowed to request user consent for cross-profile communication, via #setCrossProfilePackages(ComponentName, Set).

[Android.Runtime.Register("getCrossProfilePackages", "(Landroid/content/ComponentName;)Ljava/util/Set;", "GetGetCrossProfilePackages_Landroid_content_ComponentName_Handler", ApiSince=30)]
public virtual System.Collections.Generic.ICollection<string> GetCrossProfilePackages (Android.Content.ComponentName admin);
[<Android.Runtime.Register("getCrossProfilePackages", "(Landroid/content/ComponentName;)Ljava/util/Set;", "GetGetCrossProfilePackages_Landroid_content_ComponentName_Handler", ApiSince=30)>]
abstract member GetCrossProfilePackages : Android.Content.ComponentName -> System.Collections.Generic.ICollection<string>
override this.GetCrossProfilePackages : Android.Content.ComponentName -> System.Collections.Generic.ICollection<string>

Parameters

admin
ComponentName

the DeviceAdminReceiver this request is associated with

Returns

the set of package names the admin has previously set as allowed to request user consent for cross-profile communication, via #setCrossProfilePackages(ComponentName, Set)

Attributes

Remarks

Returns the set of package names that the admin has previously set as allowed to request user consent for cross-profile communication, via #setCrossProfilePackages(ComponentName, Set).

Assumes that the caller is a profile owner and is the given admin.

Note that other apps not included in the returned set may be able to request user consent for cross-profile communication if they have been explicitly allowlisted by the OEM.

Java documentation for android.app.admin.DevicePolicyManager.getCrossProfilePackages(android.content.ComponentName).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to