From 3aae7bd28a26f1b6b5bbb77b8ae703830cce1400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martynas=20Petu=C5=A1ka?= Date: Mon, 12 Dec 2022 10:57:33 +0000 Subject: [PATCH] Update wipeData API Bug: b/259312619 Test: N/A Change-Id: I8f25206693b037877dfb65217d0ab96fda359d62 --- .../java/android/app/admin/DevicePolicyManager.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 128a8721f1e71..17cb798f73488 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -6311,13 +6311,12 @@ public class DevicePolicyManager { * personal use, removing the managed profile and all policies set by the profile owner. *

* - *

- * Calling this method from the primary user will only work if the calling app is targeting - * Android 13 or below, in which case it will cause the device to reboot, erasing all device - * data - including all the secondary users and their data - while booting up. If an app - * targeting Android 13+ is calling this method from the primary user or last full user, - * {@link IllegalStateException} will be thrown. - *

+ *

Calling this method from the primary user will only work if the calling app is + * targeting SDK level {@link Build.VERSION_CODES#TIRAMISU} or below, in which case it will + * cause the device to reboot, erasing all device data - including all the secondary users + * and their data - while booting up. If an app targeting SDK level + * {@link Build.VERSION_CODES#UPSIDE_DOWN_CAKE} and above is calling this method from the + * primary user or last full user, {@link IllegalStateException} will be thrown.

* * If an app wants to wipe the entire device irrespective of which user they are from, they * should use {@link #wipeDevice} instead.