Loading core/java/android/app/admin/DevicePolicyManager.java 100644 → 100755 +4 −2 Original line number Diff line number Diff line Loading @@ -1008,13 +1008,15 @@ public class DevicePolicyManager { /** * Ask the user date be wiped. This will cause the device to reboot, * erasing all user data while next booting up. External storage such * as SD cards will not be erased. * as SD cards will be also erased if the flag {@link #WIPE_EXTERNAL_STORAGE} * is set. * * <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 must be 0. * @param flags Bit mask of additional options: currently 0 and * {@link #WIPE_EXTERNAL_STORAGE} are supported. */ public void wipeData(int flags) { if (mService != null) { Loading services/java/com/android/server/DevicePolicyManagerService.java +1 −0 Original line number Diff line number Diff line Loading @@ -1684,6 +1684,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { // Note: we can only do the wipe via ExternalStorageFormatter if the volume is not emulated. if ((forceExtWipe || wipeExtRequested) && !Environment.isExternalStorageEmulated()) { Intent intent = new Intent(ExternalStorageFormatter.FORMAT_AND_FACTORY_RESET); intent.putExtra(ExternalStorageFormatter.EXTRA_ALWAYS_RESET, true); intent.setComponent(ExternalStorageFormatter.COMPONENT_NAME); mWakeLock.acquire(10000); mContext.startService(intent); Loading Loading
core/java/android/app/admin/DevicePolicyManager.java 100644 → 100755 +4 −2 Original line number Diff line number Diff line Loading @@ -1008,13 +1008,15 @@ public class DevicePolicyManager { /** * Ask the user date be wiped. This will cause the device to reboot, * erasing all user data while next booting up. External storage such * as SD cards will not be erased. * as SD cards will be also erased if the flag {@link #WIPE_EXTERNAL_STORAGE} * is set. * * <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 must be 0. * @param flags Bit mask of additional options: currently 0 and * {@link #WIPE_EXTERNAL_STORAGE} are supported. */ public void wipeData(int flags) { if (mService != null) { Loading
services/java/com/android/server/DevicePolicyManagerService.java +1 −0 Original line number Diff line number Diff line Loading @@ -1684,6 +1684,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { // Note: we can only do the wipe via ExternalStorageFormatter if the volume is not emulated. if ((forceExtWipe || wipeExtRequested) && !Environment.isExternalStorageEmulated()) { Intent intent = new Intent(ExternalStorageFormatter.FORMAT_AND_FACTORY_RESET); intent.putExtra(ExternalStorageFormatter.EXTRA_ALWAYS_RESET, true); intent.setComponent(ExternalStorageFormatter.COMPONENT_NAME); mWakeLock.acquire(10000); mContext.startService(intent); Loading