Język

DevicePolicyManager.GetPolicy Method

Definition

Gets the value of the given policy, as it was set by the caller.

[Android.Runtime.Register("getPolicy", "(Landroid/app/admin/PolicyIdentifier;I)Ljava/lang/Object;", "GetGetPolicy_Landroid_app_admin_PolicyIdentifier_IHandler", ApiSince=37)]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public virtual Java.Lang.Object? GetPolicy(Android.App.Admin.PolicyIdentifier id, Android.App.Admin.DevicePolicyManagerScope scope);
[<Android.Runtime.Register("getPolicy", "(Landroid/app/admin/PolicyIdentifier;I)Ljava/lang/Object;", "GetGetPolicy_Landroid_app_admin_PolicyIdentifier_IHandler", ApiSince=37)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
abstract member GetPolicy : Android.App.Admin.PolicyIdentifier * Android.App.Admin.DevicePolicyManagerScope -> Java.Lang.Object
override this.GetPolicy : Android.App.Admin.PolicyIdentifier * Android.App.Admin.DevicePolicyManagerScope -> Java.Lang.Object

Parameters

id
PolicyIdentifier

The identifier of the policy to get.

scope
DevicePolicyManagerScope

The scope with which the policy was set.

Returns

The value of the policy, or null if the caller didn't set the policy for the given scope.

Attributes

Applies to