Share via


DevicePolicyManager.GetLockTaskPackages(ComponentName) Method

Definition

Returns the list of packages allowed to start the lock task mode.

[Android.Runtime.Register("getLockTaskPackages", "(Landroid/content/ComponentName;)[Ljava/lang/String;", "GetGetLockTaskPackages_Landroid_content_ComponentName_Handler", ApiSince=26)]
[Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_LOCK_TASK")]
public virtual string[] GetLockTaskPackages (Android.Content.ComponentName? admin);
[<Android.Runtime.Register("getLockTaskPackages", "(Landroid/content/ComponentName;)[Ljava/lang/String;", "GetGetLockTaskPackages_Landroid_content_ComponentName_Handler", ApiSince=26)>]
[<Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_LOCK_TASK")>]
abstract member GetLockTaskPackages : Android.Content.ComponentName -> string[]
override this.GetLockTaskPackages : Android.Content.ComponentName -> string[]

Parameters

admin
ComponentName

Which DeviceAdminReceiver this request is associated with. Null if the caller is not a device admin.

Returns

String[]
Attributes

Remarks

Returns the list of packages allowed to start the lock task mode.

Starting from Build.VERSION_CODES#UPSIDE_DOWN_CAKE, the returned policy will be the current resolved policy rather than the policy set by the calling admin.

Java documentation for android.app.admin.DevicePolicyManager.getLockTaskPackages(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