FactoryResetProtectionPolicy
class FactoryResetProtectionPolicy : Parcelable
| kotlin.Any | |
| ↳ | android.app.admin.FactoryResetProtectionPolicy |
The factory reset protection policy determines which accounts can unlock a device that has gone through untrusted factory reset.
Only a device owner or profile owner of an organization-owned device can set a factory reset protection policy for the device by calling the DevicePolicyManager method DevicePolicyManager.setFactoryResetProtectionPolicy(ComponentName,}.
Normally factory reset protection does not kick in if the device is factory reset via Settings. This is also the case when a device owner sets factory reset protection policy. However, when a profile owner of an organization-owned device sets factory reset protection policy that locks the device to specific accounts, the policy will take effect even if factory reset is performed from Settings.
Summary
| Nested classes | |
|---|---|
|
Builder class for |
|
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Int | |
| MutableList<String!> |
Get the list of accounts that can provision a device which has been factory reset. |
| Boolean |
Return whether factory reset protection for the device is enabled or not. |
| String |
toString() |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<FactoryResetProtectionPolicy!> | |
Public methods
describeContents
fun describeContents(): Int
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
getFactoryResetProtectionAccounts
fun getFactoryResetProtectionAccounts(): MutableList<String!>
Get the list of accounts that can provision a device which has been factory reset.
| Return | |
|---|---|
MutableList<String!> |
This value cannot be null. |
isFactoryResetProtectionEnabled
fun isFactoryResetProtectionEnabled(): Boolean
Return whether factory reset protection for the device is enabled or not.
toString
fun toString(): String
| Return | |
|---|---|
String |
a string representation of the object. |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: This value cannot be null. |
flags |
Int: This value may be null. |