DevicePolicyManager.GetLockTaskPackages(ComponentName) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- 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.
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.