diff options
26 files changed, 20 insertions, 2 deletions
diff --git a/res-hdpi/images/erasing_text.png b/res-hdpi/images/erasing_text.png Binary files differindex 2186c1950..684fc7c6c 100644 --- a/res-hdpi/images/erasing_text.png +++ b/res-hdpi/images/erasing_text.png diff --git a/res-hdpi/images/error_text.png b/res-hdpi/images/error_text.png Binary files differindex 9700f459f..00c485d70 100644 --- a/res-hdpi/images/error_text.png +++ b/res-hdpi/images/error_text.png diff --git a/res-hdpi/images/installing_security_text.png b/res-hdpi/images/installing_security_text.png Binary files differindex 0f605952c..dadcfc32b 100644 --- a/res-hdpi/images/installing_security_text.png +++ b/res-hdpi/images/installing_security_text.png diff --git a/res-hdpi/images/installing_text.png b/res-hdpi/images/installing_text.png Binary files differindex ec8b875a5..abe73b4b9 100644 --- a/res-hdpi/images/installing_text.png +++ b/res-hdpi/images/installing_text.png diff --git a/res-hdpi/images/no_command_text.png b/res-hdpi/images/no_command_text.png Binary files differindex 3eddcbbed..958e10613 100644 --- a/res-hdpi/images/no_command_text.png +++ b/res-hdpi/images/no_command_text.png diff --git a/res-mdpi/images/erasing_text.png b/res-mdpi/images/erasing_text.png Binary files differindex b0dd3c6d3..10e317829 100644 --- a/res-mdpi/images/erasing_text.png +++ b/res-mdpi/images/erasing_text.png diff --git a/res-mdpi/images/error_text.png b/res-mdpi/images/error_text.png Binary files differindex 6a47a5956..0022d10c1 100644 --- a/res-mdpi/images/error_text.png +++ b/res-mdpi/images/error_text.png diff --git a/res-mdpi/images/installing_security_text.png b/res-mdpi/images/installing_security_text.png Binary files differindex 149939862..7a4cd414b 100644 --- a/res-mdpi/images/installing_security_text.png +++ b/res-mdpi/images/installing_security_text.png diff --git a/res-mdpi/images/installing_text.png b/res-mdpi/images/installing_text.png Binary files differindex 01e9bfefb..ee95e569c 100644 --- a/res-mdpi/images/installing_text.png +++ b/res-mdpi/images/installing_text.png diff --git a/res-mdpi/images/no_command_text.png b/res-mdpi/images/no_command_text.png Binary files differindex d340df518..af7660908 100644 --- a/res-mdpi/images/no_command_text.png +++ b/res-mdpi/images/no_command_text.png diff --git a/res-xhdpi/images/erasing_text.png b/res-xhdpi/images/erasing_text.png Binary files differindex 2f8b46918..91cc35871 100644 --- a/res-xhdpi/images/erasing_text.png +++ b/res-xhdpi/images/erasing_text.png diff --git a/res-xhdpi/images/error_text.png b/res-xhdpi/images/error_text.png Binary files differindex ad18851c5..772b139e6 100644 --- a/res-xhdpi/images/error_text.png +++ b/res-xhdpi/images/error_text.png diff --git a/res-xhdpi/images/installing_security_text.png b/res-xhdpi/images/installing_security_text.png Binary files differindex acc6a7c2b..a7113a04a 100644 --- a/res-xhdpi/images/installing_security_text.png +++ b/res-xhdpi/images/installing_security_text.png diff --git a/res-xhdpi/images/installing_text.png b/res-xhdpi/images/installing_text.png Binary files differindex 32897d0f0..566eb0658 100644 --- a/res-xhdpi/images/installing_text.png +++ b/res-xhdpi/images/installing_text.png diff --git a/res-xhdpi/images/no_command_text.png b/res-xhdpi/images/no_command_text.png Binary files differindex eb43c59c5..b8da125cb 100644 --- a/res-xhdpi/images/no_command_text.png +++ b/res-xhdpi/images/no_command_text.png diff --git a/res-xxhdpi/images/erasing_text.png b/res-xxhdpi/images/erasing_text.png Binary files differindex 8ff2b2fcf..8e8dfc450 100644 --- a/res-xxhdpi/images/erasing_text.png +++ b/res-xxhdpi/images/erasing_text.png diff --git a/res-xxhdpi/images/error_text.png b/res-xxhdpi/images/error_text.png Binary files differindex 658d4ea56..7fd1983d5 100644 --- a/res-xxhdpi/images/error_text.png +++ b/res-xxhdpi/images/error_text.png diff --git a/res-xxhdpi/images/installing_security_text.png b/res-xxhdpi/images/installing_security_text.png Binary files differindex 23fcaa441..9779927ef 100644 --- a/res-xxhdpi/images/installing_security_text.png +++ b/res-xxhdpi/images/installing_security_text.png diff --git a/res-xxhdpi/images/installing_text.png b/res-xxhdpi/images/installing_text.png Binary files differindex fd8e58464..fa488960e 100644 --- a/res-xxhdpi/images/installing_text.png +++ b/res-xxhdpi/images/installing_text.png diff --git a/res-xxhdpi/images/no_command_text.png b/res-xxhdpi/images/no_command_text.png Binary files differindex 23932d6b7..d72a840e9 100644 --- a/res-xxhdpi/images/no_command_text.png +++ b/res-xxhdpi/images/no_command_text.png diff --git a/res-xxxhdpi/images/erasing_text.png b/res-xxxhdpi/images/erasing_text.png Binary files differindex 031529371..7c198176d 100644 --- a/res-xxxhdpi/images/erasing_text.png +++ b/res-xxxhdpi/images/erasing_text.png diff --git a/res-xxxhdpi/images/error_text.png b/res-xxxhdpi/images/error_text.png Binary files differindex dba127f02..4cd2a8cc4 100644 --- a/res-xxxhdpi/images/error_text.png +++ b/res-xxxhdpi/images/error_text.png diff --git a/res-xxxhdpi/images/installing_security_text.png b/res-xxxhdpi/images/installing_security_text.png Binary files differindex 6cdbef48e..d84c5d9a9 100644 --- a/res-xxxhdpi/images/installing_security_text.png +++ b/res-xxxhdpi/images/installing_security_text.png diff --git a/res-xxxhdpi/images/installing_text.png b/res-xxxhdpi/images/installing_text.png Binary files differindex 32511a9c5..ffe1474f9 100644 --- a/res-xxxhdpi/images/installing_text.png +++ b/res-xxxhdpi/images/installing_text.png diff --git a/res-xxxhdpi/images/no_command_text.png b/res-xxxhdpi/images/no_command_text.png Binary files differindex b6cdd7718..f4f13003b 100644 --- a/res-xxxhdpi/images/no_command_text.png +++ b/res-xxxhdpi/images/no_command_text.png diff --git a/tools/recovery_l10n/src/com/android/recovery_l10n/Main.java b/tools/recovery_l10n/src/com/android/recovery_l10n/Main.java index ac94bde1c..30d45f6ae 100644 --- a/tools/recovery_l10n/src/com/android/recovery_l10n/Main.java +++ b/tools/recovery_l10n/src/com/android/recovery_l10n/Main.java @@ -38,6 +38,7 @@ import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.Comparator; import java.util.HashMap; import java.util.Locale; @@ -148,11 +149,28 @@ public class Main extends Activity { mText = (TextView) findViewById(R.id.text); String[] localeNames = getAssets().getLocales(); - Arrays.sort(localeNames); + Arrays.sort(localeNames, new Comparator<String>() { + // Override the string comparator so that en is sorted behind en_US. + // As a result, en_US will be matched first in recovery. + @Override + public int compare(String s1, String s2) { + if (s1.equals(s2)) { + return 0; + } else if (s1.startsWith(s2)) { + return -1; + } else if (s2.startsWith(s1)) { + return 1; + } + return s1.compareTo(s2); + } + }); + ArrayList<Locale> locales = new ArrayList<Locale>(); for (String localeName : localeNames) { Log.i(TAG, "locale = " + localeName); - locales.add(Locale.forLanguageTag(localeName)); + if (!localeName.isEmpty()) { + locales.add(Locale.forLanguageTag(localeName)); + } } final Runnable seq = buildSequence(locales.toArray(new Locale[0])); |