diff options
| author | 2012-08-23 09:52:14 -0700 | |
|---|---|---|
| committer | 2012-08-23 09:52:14 -0700 | |
| commit | e33b4007ee56e843d5e99cfb92627425a551058d (patch) | |
| tree | 81bbf599c26088477837b05b8ee7d9a49448794f | |
| parent | 9f814ac5fc0df77527d69710e8c1efa9d9d6f495 (diff) | |
pass --locale argument to recovery
When RecoverySystem boots into recovery (to install an update or wipe
data and/or cache), pass the --locale argument with the currently
selected locale.
Change-Id: Ib280330932a402be2011207bff8f05caa9b999cd
| -rw-r--r-- | core/java/android/os/RecoverySystem.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/java/android/os/RecoverySystem.java b/core/java/android/os/RecoverySystem.java index 43cf74eab7e9..0d11ab45d036 100644 --- a/core/java/android/os/RecoverySystem.java +++ b/core/java/android/os/RecoverySystem.java @@ -40,6 +40,7 @@ import java.util.Enumeration; import java.util.HashSet; import java.util.Iterator; import java.util.List; +import java.util.Locale; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; @@ -326,7 +327,8 @@ public class RecoverySystem { throws IOException { String filename = packageFile.getCanonicalPath(); Log.w(TAG, "!!! REBOOTING TO INSTALL " + filename + " !!!"); - String arg = "--update_package=" + filename; + String arg = "--update_package=" + filename + + "\n--locale=" + Locale.getDefault().toString(); bootCommand(context, arg); } @@ -357,7 +359,7 @@ public class RecoverySystem { // Block until the ordered broadcast has completed. condition.block(); - bootCommand(context, "--wipe_data"); + bootCommand(context, "--wipe_data\n--locale=" + Locale.getDefault().toString()); } /** @@ -365,7 +367,7 @@ public class RecoverySystem { * @throws IOException if something goes wrong. */ public static void rebootWipeCache(Context context) throws IOException { - bootCommand(context, "--wipe_cache"); + bootCommand(context, "--wipe_cache\n--locale=" + Locale.getDefault().toString()); } /** |