语言

FactoryResetProtectionPolicy.Builder.SetFactoryResetProtectionEnabled 方法

定义

设置是否启用恢复出厂设置保护。

[Android.Runtime.Register("setFactoryResetProtectionEnabled", "(Z)Landroid/app/admin/FactoryResetProtectionPolicy$Builder;", "GetSetFactoryResetProtectionEnabled_ZHandler", ApiSince=30)]
public virtual Android.App.Admin.FactoryResetProtectionPolicy.Builder SetFactoryResetProtectionEnabled(bool factoryResetProtectionEnabled);
[<Android.Runtime.Register("setFactoryResetProtectionEnabled", "(Z)Landroid/app/admin/FactoryResetProtectionPolicy$Builder;", "GetSetFactoryResetProtectionEnabled_ZHandler", ApiSince=30)>]
abstract member SetFactoryResetProtectionEnabled : bool -> Android.App.Admin.FactoryResetProtectionPolicy.Builder
override this.SetFactoryResetProtectionEnabled : bool -> Android.App.Admin.FactoryResetProtectionPolicy.Builder

参数

factoryResetProtectionEnabled
Boolean

是否启用策略。

返回

同一个 Builder 实例。 此值不能为 null。

特性

注解

设置是否启用恢复出厂设置保护。

禁用后,当设备经历不受信任的恢复出厂设置时,恢复出厂设置不会全部启动。 这既适用于使用者解锁流,也适用于通过 setFactoryResetProtectionAccounts(List) 替代管理员帐户。 默认情况下,已启用恢复出厂设置保护。

Android 参考。android.app.admin.FactoryResetProtectionPolicy.Builder.setFactoryResetProtectionEnabled

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于