summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2017-01-14 00:11:07 +0100
committerandroid-build-merger <android-build-merger@google.com>2017-01-14 00:11:07 +0100
commitf92c313723413bbb782aadcc1327d5eac1c492ed (patch)
tree3d9523b89e4fca5c538011e954309709409e9893
parentMerge changes from topic 'host_suffix_cleanup' am: 8031c2d2bb am: f8f1a25850 (diff)
parentMerge "Update background text images in recovery" am: f0af02fea6 (diff)
downloadandroid_bootable_recovery-f92c313723413bbb782aadcc1327d5eac1c492ed.tar
android_bootable_recovery-f92c313723413bbb782aadcc1327d5eac1c492ed.tar.gz
android_bootable_recovery-f92c313723413bbb782aadcc1327d5eac1c492ed.tar.bz2
android_bootable_recovery-f92c313723413bbb782aadcc1327d5eac1c492ed.tar.lz
android_bootable_recovery-f92c313723413bbb782aadcc1327d5eac1c492ed.tar.xz
android_bootable_recovery-f92c313723413bbb782aadcc1327d5eac1c492ed.tar.zst
android_bootable_recovery-f92c313723413bbb782aadcc1327d5eac1c492ed.zip
Diffstat (limited to '')
-rw-r--r--res-hdpi/images/erasing_text.pngbin50373 -> 50680 bytes
-rw-r--r--res-hdpi/images/error_text.pngbin35720 -> 36036 bytes
-rw-r--r--res-hdpi/images/installing_security_text.pngbin111582 -> 113819 bytes
-rw-r--r--res-hdpi/images/installing_text.pngbin102734 -> 104768 bytes
-rw-r--r--res-hdpi/images/no_command_text.pngbin61665 -> 62037 bytes
-rw-r--r--res-mdpi/images/erasing_text.pngbin29558 -> 29898 bytes
-rw-r--r--res-mdpi/images/error_text.pngbin20926 -> 21147 bytes
-rw-r--r--res-mdpi/images/installing_security_text.pngbin69709 -> 70010 bytes
-rw-r--r--res-mdpi/images/installing_text.pngbin61548 -> 61701 bytes
-rw-r--r--res-mdpi/images/no_command_text.pngbin34232 -> 34683 bytes
-rw-r--r--res-xhdpi/images/erasing_text.pngbin72595 -> 73361 bytes
-rw-r--r--res-xhdpi/images/error_text.pngbin51739 -> 52019 bytes
-rw-r--r--res-xhdpi/images/installing_security_text.pngbin195507 -> 196871 bytes
-rw-r--r--res-xhdpi/images/installing_text.pngbin174877 -> 175570 bytes
-rw-r--r--res-xhdpi/images/no_command_text.pngbin85999 -> 86622 bytes
-rw-r--r--res-xxhdpi/images/erasing_text.pngbin119060 -> 121386 bytes
-rw-r--r--res-xxhdpi/images/error_text.pngbin84432 -> 85555 bytes
-rw-r--r--res-xxhdpi/images/installing_security_text.pngbin447442 -> 387979 bytes
-rw-r--r--res-xxhdpi/images/installing_text.pngbin416541 -> 355503 bytes
-rw-r--r--res-xxhdpi/images/no_command_text.pngbin243828 -> 148704 bytes
-rw-r--r--res-xxxhdpi/images/erasing_text.pngbin264753 -> 257605 bytes
-rw-r--r--res-xxxhdpi/images/error_text.pngbin178491 -> 173381 bytes
-rw-r--r--res-xxxhdpi/images/installing_security_text.pngbin611664 -> 620933 bytes
-rw-r--r--res-xxxhdpi/images/installing_text.pngbin569291 -> 581822 bytes
-rw-r--r--res-xxxhdpi/images/no_command_text.pngbin333053 -> 322613 bytes
-rw-r--r--tools/recovery_l10n/src/com/android/recovery_l10n/Main.java22
26 files changed, 20 insertions, 2 deletions
diff --git a/res-hdpi/images/erasing_text.png b/res-hdpi/images/erasing_text.png
index 2186c1950..684fc7c6c 100644
--- a/res-hdpi/images/erasing_text.png
+++ b/res-hdpi/images/erasing_text.png
Binary files differ
diff --git a/res-hdpi/images/error_text.png b/res-hdpi/images/error_text.png
index 9700f459f..00c485d70 100644
--- a/res-hdpi/images/error_text.png
+++ b/res-hdpi/images/error_text.png
Binary files differ
diff --git a/res-hdpi/images/installing_security_text.png b/res-hdpi/images/installing_security_text.png
index 0f605952c..dadcfc32b 100644
--- a/res-hdpi/images/installing_security_text.png
+++ b/res-hdpi/images/installing_security_text.png
Binary files differ
diff --git a/res-hdpi/images/installing_text.png b/res-hdpi/images/installing_text.png
index ec8b875a5..abe73b4b9 100644
--- a/res-hdpi/images/installing_text.png
+++ b/res-hdpi/images/installing_text.png
Binary files differ
diff --git a/res-hdpi/images/no_command_text.png b/res-hdpi/images/no_command_text.png
index 3eddcbbed..958e10613 100644
--- a/res-hdpi/images/no_command_text.png
+++ b/res-hdpi/images/no_command_text.png
Binary files differ
diff --git a/res-mdpi/images/erasing_text.png b/res-mdpi/images/erasing_text.png
index b0dd3c6d3..10e317829 100644
--- a/res-mdpi/images/erasing_text.png
+++ b/res-mdpi/images/erasing_text.png
Binary files differ
diff --git a/res-mdpi/images/error_text.png b/res-mdpi/images/error_text.png
index 6a47a5956..0022d10c1 100644
--- a/res-mdpi/images/error_text.png
+++ b/res-mdpi/images/error_text.png
Binary files differ
diff --git a/res-mdpi/images/installing_security_text.png b/res-mdpi/images/installing_security_text.png
index 149939862..7a4cd414b 100644
--- a/res-mdpi/images/installing_security_text.png
+++ b/res-mdpi/images/installing_security_text.png
Binary files differ
diff --git a/res-mdpi/images/installing_text.png b/res-mdpi/images/installing_text.png
index 01e9bfefb..ee95e569c 100644
--- a/res-mdpi/images/installing_text.png
+++ b/res-mdpi/images/installing_text.png
Binary files differ
diff --git a/res-mdpi/images/no_command_text.png b/res-mdpi/images/no_command_text.png
index d340df518..af7660908 100644
--- a/res-mdpi/images/no_command_text.png
+++ b/res-mdpi/images/no_command_text.png
Binary files differ
diff --git a/res-xhdpi/images/erasing_text.png b/res-xhdpi/images/erasing_text.png
index 2f8b46918..91cc35871 100644
--- a/res-xhdpi/images/erasing_text.png
+++ b/res-xhdpi/images/erasing_text.png
Binary files differ
diff --git a/res-xhdpi/images/error_text.png b/res-xhdpi/images/error_text.png
index ad18851c5..772b139e6 100644
--- a/res-xhdpi/images/error_text.png
+++ b/res-xhdpi/images/error_text.png
Binary files differ
diff --git a/res-xhdpi/images/installing_security_text.png b/res-xhdpi/images/installing_security_text.png
index acc6a7c2b..a7113a04a 100644
--- a/res-xhdpi/images/installing_security_text.png
+++ b/res-xhdpi/images/installing_security_text.png
Binary files differ
diff --git a/res-xhdpi/images/installing_text.png b/res-xhdpi/images/installing_text.png
index 32897d0f0..566eb0658 100644
--- a/res-xhdpi/images/installing_text.png
+++ b/res-xhdpi/images/installing_text.png
Binary files differ
diff --git a/res-xhdpi/images/no_command_text.png b/res-xhdpi/images/no_command_text.png
index eb43c59c5..b8da125cb 100644
--- a/res-xhdpi/images/no_command_text.png
+++ b/res-xhdpi/images/no_command_text.png
Binary files differ
diff --git a/res-xxhdpi/images/erasing_text.png b/res-xxhdpi/images/erasing_text.png
index 8ff2b2fcf..8e8dfc450 100644
--- a/res-xxhdpi/images/erasing_text.png
+++ b/res-xxhdpi/images/erasing_text.png
Binary files differ
diff --git a/res-xxhdpi/images/error_text.png b/res-xxhdpi/images/error_text.png
index 658d4ea56..7fd1983d5 100644
--- a/res-xxhdpi/images/error_text.png
+++ b/res-xxhdpi/images/error_text.png
Binary files differ
diff --git a/res-xxhdpi/images/installing_security_text.png b/res-xxhdpi/images/installing_security_text.png
index 23fcaa441..9779927ef 100644
--- a/res-xxhdpi/images/installing_security_text.png
+++ b/res-xxhdpi/images/installing_security_text.png
Binary files differ
diff --git a/res-xxhdpi/images/installing_text.png b/res-xxhdpi/images/installing_text.png
index fd8e58464..fa488960e 100644
--- a/res-xxhdpi/images/installing_text.png
+++ b/res-xxhdpi/images/installing_text.png
Binary files differ
diff --git a/res-xxhdpi/images/no_command_text.png b/res-xxhdpi/images/no_command_text.png
index 23932d6b7..d72a840e9 100644
--- a/res-xxhdpi/images/no_command_text.png
+++ b/res-xxhdpi/images/no_command_text.png
Binary files differ
diff --git a/res-xxxhdpi/images/erasing_text.png b/res-xxxhdpi/images/erasing_text.png
index 031529371..7c198176d 100644
--- a/res-xxxhdpi/images/erasing_text.png
+++ b/res-xxxhdpi/images/erasing_text.png
Binary files differ
diff --git a/res-xxxhdpi/images/error_text.png b/res-xxxhdpi/images/error_text.png
index dba127f02..4cd2a8cc4 100644
--- a/res-xxxhdpi/images/error_text.png
+++ b/res-xxxhdpi/images/error_text.png
Binary files differ
diff --git a/res-xxxhdpi/images/installing_security_text.png b/res-xxxhdpi/images/installing_security_text.png
index 6cdbef48e..d84c5d9a9 100644
--- a/res-xxxhdpi/images/installing_security_text.png
+++ b/res-xxxhdpi/images/installing_security_text.png
Binary files differ
diff --git a/res-xxxhdpi/images/installing_text.png b/res-xxxhdpi/images/installing_text.png
index 32511a9c5..ffe1474f9 100644
--- a/res-xxxhdpi/images/installing_text.png
+++ b/res-xxxhdpi/images/installing_text.png
Binary files differ
diff --git a/res-xxxhdpi/images/no_command_text.png b/res-xxxhdpi/images/no_command_text.png
index b6cdd7718..f4f13003b 100644
--- a/res-xxxhdpi/images/no_command_text.png
+++ b/res-xxxhdpi/images/no_command_text.png
Binary files differ
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]));