diff options
| author | 2021-04-08 13:24:07 -0700 | |
|---|---|---|
| committer | 2021-04-08 13:25:49 -0700 | |
| commit | ef5d119cd798431e727263e92743283789ae04e6 (patch) | |
| tree | e0eaedb64c05be10d6b46d553b91d02ce1c30a85 | |
| parent | 64b26b5c49ee55422a2c5d30b9bddc2b60076b3e (diff) | |
Documents that wipeData() is allowed for apps with MASTER_CLEAR permission.
Test: none
Bug: 169779216
Change-Id: Ic1e95efe77ca5289db6993caaffd590fcc1210cd
| -rw-r--r-- | core/java/android/app/admin/DevicePolicyManager.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 843aa2ecb492..621bc99c43d1 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -5297,7 +5297,8 @@ public class DevicePolicyManager { * {@link #WIPE_EXTERNAL_STORAGE}, {@link #WIPE_RESET_PROTECTION_DATA}, * {@link #WIPE_EUICC} and {@link #WIPE_SILENTLY}. * @throws SecurityException if the calling application does not own an active administrator - * that uses {@link DeviceAdminInfo#USES_POLICY_WIPE_DATA} + * that uses {@link DeviceAdminInfo#USES_POLICY_WIPE_DATA} or is not granted the + * {@link android.Manifest.permission#MASTER_CLEAR} permission. */ public void wipeData(int flags) { wipeDataInternal(flags, ""); @@ -5325,7 +5326,8 @@ public class DevicePolicyManager { * @param reason a string that contains the reason for wiping data, which can be * presented to the user. * @throws SecurityException if the calling application does not own an active administrator - * that uses {@link DeviceAdminInfo#USES_POLICY_WIPE_DATA} + * that uses {@link DeviceAdminInfo#USES_POLICY_WIPE_DATA} or is not granted the + * {@link android.Manifest.permission#MASTER_CLEAR} permission. * @throws IllegalArgumentException if the input reason string is null or empty, or if * {@link #WIPE_SILENTLY} is set. */ |