Udostępnij za pośrednictwem


DevicePolicyManager.GetFactoryResetProtectionPolicy(ComponentName) Method

Definition

Callable by device owner or profile owner of an organization-owned device, to retrieve the current factory reset protection (FRP) policy set previously by #setFactoryResetProtectionPolicy.

[Android.Runtime.Register("getFactoryResetProtectionPolicy", "(Landroid/content/ComponentName;)Landroid/app/admin/FactoryResetProtectionPolicy;", "GetGetFactoryResetProtectionPolicy_Landroid_content_ComponentName_Handler", ApiSince=30)]
[Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_FACTORY_RESET")]
public virtual Android.App.Admin.FactoryResetProtectionPolicy? GetFactoryResetProtectionPolicy (Android.Content.ComponentName? admin);
[<Android.Runtime.Register("getFactoryResetProtectionPolicy", "(Landroid/content/ComponentName;)Landroid/app/admin/FactoryResetProtectionPolicy;", "GetGetFactoryResetProtectionPolicy_Landroid_content_ComponentName_Handler", ApiSince=30)>]
[<Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_FACTORY_RESET")>]
abstract member GetFactoryResetProtectionPolicy : Android.Content.ComponentName -> Android.App.Admin.FactoryResetProtectionPolicy
override this.GetFactoryResetProtectionPolicy : Android.Content.ComponentName -> Android.App.Admin.FactoryResetProtectionPolicy

Parameters

admin
ComponentName

Which DeviceAdminReceiver this request is associated with or null if the caller is not a device admin

Returns

The current FRP policy object or null if no policy is set.

Attributes

Remarks

Callable by device owner or profile owner of an organization-owned device, to retrieve the current factory reset protection (FRP) policy set previously by #setFactoryResetProtectionPolicy.

This method can also be called by the FRP management agent on device or with the permission android.Manifest.permission#MASTER_CLEAR, in which case, it can pass null as the ComponentName.

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