diff --git a/tools/recovery_l10n/res/layout/main.xml b/tools/recovery_l10n/res/layout/main.xml index 0900b110..05a16e1e 100644 --- a/tools/recovery_l10n/res/layout/main.xml +++ b/tools/recovery_l10n/res/layout/main.xml @@ -19,7 +19,9 @@ locales = new ArrayList(); - 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]));