diff options
author | Doug Zongker <dougz@android.com> | 2011-07-19 13:00:30 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-07-19 13:00:30 -0700 |
commit | 9d29d155c51a26d789cce2c4c24c659487c63554 (patch) | |
tree | 22732a4d73f44d16eb2366676fd7e78a347f47e8 | |
parent | 9c14256b57e3537be4db4744a1f13edae511d7b7 (diff) | |
parent | 33651201375d3670672964503994c410b8eeed7b (diff) | |
download | frameworks_base-9d29d155c51a26d789cce2c4c24c659487c63554.zip frameworks_base-9d29d155c51a26d789cce2c4c24c659487c63554.tar.gz frameworks_base-9d29d155c51a26d789cce2c4c24c659487c63554.tar.bz2 |
Merge "add rebootWipeCache call to RecoverySystem API"
-rw-r--r-- | api/current.txt | 1 | ||||
-rw-r--r-- | core/java/android/os/RecoverySystem.java | 15 | ||||
-rw-r--r-- | services/java/com/android/server/MasterClearReceiver.java | 6 |
3 files changed, 5 insertions, 17 deletions
diff --git a/api/current.txt b/api/current.txt index b462695..a9aaf38 100644 --- a/api/current.txt +++ b/api/current.txt @@ -14434,6 +14434,7 @@ package android.os { public class RecoverySystem { ctor public RecoverySystem(); method public static void installPackage(android.content.Context, java.io.File) throws java.io.IOException; + method public static void rebootWipeCache(android.content.Context) throws java.io.IOException; method public static void rebootWipeUserData(android.content.Context) throws java.io.IOException; method public static void verifyPackage(java.io.File, android.os.RecoverySystem.ProgressListener, java.io.File) throws java.security.GeneralSecurityException, java.io.IOException; } diff --git a/core/java/android/os/RecoverySystem.java b/core/java/android/os/RecoverySystem.java index ae605fb..73e8d98 100644 --- a/core/java/android/os/RecoverySystem.java +++ b/core/java/android/os/RecoverySystem.java @@ -357,20 +357,11 @@ public class RecoverySystem { } /** - * Reboot into the recovery system to wipe the /data partition and toggle - * Encrypted File Systems on/off. - * @param extras to add to the RECOVERY_COMPLETED intent after rebooting. + * Reboot into the recovery system to wipe the /cache partition. * @throws IOException if something goes wrong. - * - * @hide */ - public static void rebootToggleEFS(Context context, boolean efsEnabled) - throws IOException { - if (efsEnabled) { - bootCommand(context, "--set_encrypted_filesystem=on"); - } else { - bootCommand(context, "--set_encrypted_filesystem=off"); - } + public static void rebootWipeCache(Context context) throws IOException { + bootCommand(context, "--wipe_cache"); } /** diff --git a/services/java/com/android/server/MasterClearReceiver.java b/services/java/com/android/server/MasterClearReceiver.java index bdb5a24..86f57d1 100644 --- a/services/java/com/android/server/MasterClearReceiver.java +++ b/services/java/com/android/server/MasterClearReceiver.java @@ -43,11 +43,7 @@ public class MasterClearReceiver extends BroadcastReceiver { @Override public void run() { try { - if (intent.hasExtra("enableEFS")) { - RecoverySystem.rebootToggleEFS(context, intent.getBooleanExtra("enableEFS", false)); - } else { - RecoverySystem.rebootWipeUserData(context); - } + RecoverySystem.rebootWipeUserData(context); Log.wtf(TAG, "Still running after master clear?!"); } catch (IOException e) { Slog.e(TAG, "Can't perform master clear/factory reset", e); |