summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorMasanori Ogino <ogino.masanori@sharp.co.jp>2012-02-15 19:25:50 +0900
committerMasanori Ogino <ogino.masanori@sharp.co.jp>2012-02-16 09:42:36 +0900
commitf535cb04f08575d29118fab0342b1e6274091734 (patch)
tree6142be0782fbea94334881b16b4aceee88345b04 /services
parent472512f6970fa170e2e1a3e1c24ac2b742e2e6b6 (diff)
downloadframeworks_base-f535cb04f08575d29118fab0342b1e6274091734.zip
frameworks_base-f535cb04f08575d29118fab0342b1e6274091734.tar.gz
frameworks_base-f535cb04f08575d29118fab0342b1e6274091734.tar.bz2
Wipe the user data out in any case.
When the external storage is not mounted, the android system won't wipe out the user data (i.e. "/data") if wipeData() is called with the flag WIPE_EXTERNAL_STORAGE. We think that the user data should be wiped out in any options and also wipeData(int) method currently supports also for a external storage. So we will also change the API reference comment. If we should care about backward compatibility of this method behavior with the option WIPE_EXTERNAL_STORAGE, then we would add an another bitmask something like a ALWAYS_RESET. Change-Id: Id7bf673c722bacc0480d32e46553b9a348513879
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/DevicePolicyManagerService.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/services/java/com/android/server/DevicePolicyManagerService.java b/services/java/com/android/server/DevicePolicyManagerService.java
index 47644de..03f73b7 100644
--- a/services/java/com/android/server/DevicePolicyManagerService.java
+++ b/services/java/com/android/server/DevicePolicyManagerService.java
@@ -1670,6 +1670,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);