Android.App.Admin.DevicePolicyManager.HasGrantedPolicy Method
Returns true if an administrator has been granted a particular device policy.

Syntax

[Android.Runtime.Register("hasGrantedPolicy", "(Landroid/content/ComponentName;I)Z", "GetHasGrantedPolicy_Landroid_content_ComponentName_IHandler")]
public virtual bool HasGrantedPolicy (Android.Content.ComponentName admin, [Android.Runtime.GeneratedEnum] DeviceAdminUses usesPolicy)

Parameters

admin
Which Android.App.Admin.DeviceAdminReceiver this request is associated with. Must be an active administrator, or an exception will be thrown.
usesPolicy
Which uses-policy to check, as defined in Android.App.Admin.DeviceAdminInfo.

Returns

Documentation for this section has not yet been entered.

Remarks

Returns true if an administrator has been granted a particular device policy. This can be used to check if the administrator was activated under an earlier set of policies, but requires additional policies after an upgrade.

[Android Documentation]

Requirements

Namespace: Android.App.Admin
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 11