diff options
author | Elliott Hughes <enh@google.com> | 2016-04-15 17:57:55 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-04-15 17:57:55 +0200 |
commit | 6fa5fa91bf1439e6c5070f3aee9b447f995882c1 (patch) | |
tree | 96292b5f3b47569444b09223af91d48519434267 /tools/recovery_l10n/src/com | |
parent | resolve merge conflicts of 8febafa to nyc-dev-plus-aosp (diff) | |
parent | Explicitly set the font face and color. (diff) | |
download | android_bootable_recovery-6fa5fa91bf1439e6c5070f3aee9b447f995882c1.tar android_bootable_recovery-6fa5fa91bf1439e6c5070f3aee9b447f995882c1.tar.gz android_bootable_recovery-6fa5fa91bf1439e6c5070f3aee9b447f995882c1.tar.bz2 android_bootable_recovery-6fa5fa91bf1439e6c5070f3aee9b447f995882c1.tar.lz android_bootable_recovery-6fa5fa91bf1439e6c5070f3aee9b447f995882c1.tar.xz android_bootable_recovery-6fa5fa91bf1439e6c5070f3aee9b447f995882c1.tar.zst android_bootable_recovery-6fa5fa91bf1439e6c5070f3aee9b447f995882c1.zip |
Diffstat (limited to 'tools/recovery_l10n/src/com')
-rw-r--r-- | tools/recovery_l10n/src/com/android/recovery_l10n/Main.java | 9 |
1 files changed, 3 insertions, 6 deletions
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 3f2bebe60..817a3ad7d 100644 --- a/tools/recovery_l10n/src/com/android/recovery_l10n/Main.java +++ b/tools/recovery_l10n/src/com/android/recovery_l10n/Main.java @@ -149,12 +149,9 @@ public class Main extends Activity { String[] localeNames = getAssets().getLocales(); Arrays.sort(localeNames); ArrayList<Locale> locales = new ArrayList<Locale>(); - for (String ln : localeNames) { - int u = ln.indexOf('_'); - if (u >= 0) { - Log.i(TAG, "locale = " + ln); - locales.add(new Locale(ln.substring(0, u), ln.substring(u+1))); - } + for (String localeName : localeNames) { + Log.i(TAG, "locale = " + localeName); + locales.add(Locale.forLanguageTag(localeName)); } final Runnable seq = buildSequence(locales.toArray(new Locale[0])); |