summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/admin
diff options
context:
space:
mode:
authorPaul Crowley <paulcrowley@google.com>2014-11-26 12:09:51 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-26 12:09:51 +0000
commit5ff0e5fb6b339a7dea0cbc344e88673b7a99e593 (patch)
tree9b4ef5545fc5ca892cd0eb735c22e4cdc22c4132 /core/java/android/app/admin
parentbc2f1371bbeb0f66c24fafec22b9b18ca6e845cd (diff)
parent0d122e265c52ef25dbad652378b3a5e51a86f041 (diff)
downloadframeworks_base-5ff0e5fb6b339a7dea0cbc344e88673b7a99e593.zip
frameworks_base-5ff0e5fb6b339a7dea0cbc344e88673b7a99e593.tar.gz
frameworks_base-5ff0e5fb6b339a7dea0cbc344e88673b7a99e593.tar.bz2
am 0d122e26: am ba94fd5e: am 77e25331: Merge "Add flag for wiping factory reset protection data." into lmp-mr1-dev
* commit '0d122e265c52ef25dbad652378b3a5e51a86f041': Add flag for wiping factory reset protection data.
Diffstat (limited to 'core/java/android/app/admin')
-rw-r--r--core/java/android/app/admin/DevicePolicyManager.java20
1 files changed, 14 insertions, 6 deletions
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 39c4342..50d6b11 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -1477,22 +1477,30 @@ public class DevicePolicyManager {
/**
* Flag for {@link #wipeData(int)}: also erase the device's external
- * storage.
+ * storage (such as SD cards).
*/
public static final int WIPE_EXTERNAL_STORAGE = 0x0001;
/**
+ * Flag for {@link #wipeData(int)}: also erase the factory reset protection
+ * data.
+ *
+ * This flag may only be set by device owner admins; if it is set by other
+ * admins a {@link SecurityException} will be thrown.
+ */
+ public static final int WIPE_RESET_PROTECTION_DATA = 0x0002;
+
+ /**
* Ask the user data be wiped. This will cause the device to reboot,
- * erasing all user data while next booting up. External storage such
- * as SD cards will be also erased if the flag {@link #WIPE_EXTERNAL_STORAGE}
- * is set.
+ * erasing all user data while next booting up.
*
* <p>The calling device admin must have requested
* {@link DeviceAdminInfo#USES_POLICY_WIPE_DATA} to be able to call
* this method; if it has not, a security exception will be thrown.
*
- * @param flags Bit mask of additional options: currently 0 and
- * {@link #WIPE_EXTERNAL_STORAGE} are supported.
+ * @param flags Bit mask of additional options: currently supported flags
+ * are {@link #WIPE_EXTERNAL_STORAGE} and
+ * {@link #WIPE_RESET_PROTECTION_DATA}.
*/
public void wipeData(int flags) {
if (mService != null) {