DevicePolicyManager.SetFactoryResetProtectionPolicy 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.
Callable by device owner or profile owner of an organization-owned device, to set a factory reset protection (FRP) policy.
[Android.Runtime.Register("setFactoryResetProtectionPolicy", "(Landroid/content/ComponentName;Landroid/app/admin/FactoryResetProtectionPolicy;)V", "GetSetFactoryResetProtectionPolicy_Landroid_content_ComponentName_Landroid_app_admin_FactoryResetProtectionPolicy_Handler", ApiSince=30)]
[Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_FACTORY_RESET")]
public virtual void SetFactoryResetProtectionPolicy (Android.Content.ComponentName? admin, Android.App.Admin.FactoryResetProtectionPolicy? policy);
[<Android.Runtime.Register("setFactoryResetProtectionPolicy", "(Landroid/content/ComponentName;Landroid/app/admin/FactoryResetProtectionPolicy;)V", "GetSetFactoryResetProtectionPolicy_Landroid_content_ComponentName_Landroid_app_admin_FactoryResetProtectionPolicy_Handler", ApiSince=30)>]
[<Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_FACTORY_RESET")>]
abstract member SetFactoryResetProtectionPolicy : Android.Content.ComponentName * Android.App.Admin.FactoryResetProtectionPolicy -> unit
override this.SetFactoryResetProtectionPolicy : Android.Content.ComponentName * Android.App.Admin.FactoryResetProtectionPolicy -> unit
Parameters
- admin
- ComponentName
Which DeviceAdminReceiver
this request is associated with. Null if the
caller is not a device admin
- policy
- FactoryResetProtectionPolicy
the new FRP policy, or null
to clear the current policy.
- Attributes
Remarks
Callable by device owner or profile owner of an organization-owned device, to set a factory reset protection (FRP) policy. When a new policy is set, the system notifies the FRP management agent of a policy change by broadcasting ACTION_RESET_PROTECTION_POLICY_CHANGED
.
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.