FactoryResetProtectionPolicy
public
final
class
FactoryResetProtectionPolicy
extends Object
implements
Parcelable
java.lang.Object | |
↳ | 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,
FactoryResetProtectionPolicy)
}.
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.
See also:
Summary
Nested classes | |
---|---|
class |
FactoryResetProtectionPolicy.Builder
Builder class for |
Inherited constants |
---|
Fields | |
---|---|
public
static
final
Creator<FactoryResetProtectionPolicy> |
CREATOR
|
Public methods | |
---|---|
int
|
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
List<String>
|
getFactoryResetProtectionAccounts()
Get the list of accounts that can provision a device which has been factory reset. |
boolean
|
isFactoryResetProtectionEnabled()
Return whether factory reset protection for the device is enabled or not. |
String
|
toString()
Returns a string representation of the object. |
void
|
writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel. |
Inherited methods | |
---|---|
Fields
Public methods
describeContents
public int describeContents ()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of writeToParcel(android.os.Parcel, int)
,
the return value of this method must include the
CONTENTS_FILE_DESCRIPTOR
bit.
Returns | |
---|---|
int |
a bitmask indicating the set of special object types marshaled
by this Parcelable object instance.
Value is either 0 or CONTENTS_FILE_DESCRIPTOR |
getFactoryResetProtectionAccounts
public List<String> getFactoryResetProtectionAccounts ()
Get the list of accounts that can provision a device which has been factory reset.
Returns | |
---|---|
List<String> |
This value cannot be null . |
isFactoryResetProtectionEnabled
public boolean isFactoryResetProtectionEnabled ()
Return whether factory reset protection for the device is enabled or not.
Returns | |
---|---|
boolean |
toString
public String toString ()
Returns a string representation of the object.
Returns | |
---|---|
String |
a string representation of the object. |
writeToParcel
public void writeToParcel (Parcel dest, int flags)
Flatten this object in to a Parcel.
Parameters | |
---|---|
dest |
Parcel : This value cannot be null . |
flags |
int : This value may be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-11 UTC.