diff --git a/mobile/android/base/preferences/LocaleListPreference.java b/mobile/android/base/preferences/LocaleListPreference.java index 206fecbbefe..5259354821f 100644 --- a/mobile/android/base/preferences/LocaleListPreference.java +++ b/mobile/android/base/preferences/LocaleListPreference.java @@ -172,6 +172,12 @@ public class LocaleListPreference extends ListPreference { * on this device without known issues. */ public boolean isUsable(CharacterValidator validator) { + if (Versions.preLollipop && this.tag.matches("[a-zA-Z]{3}.*")) { + // Earlier versions of Android can't load three-char locale code + // resources. + return false; + } + // Oh, for Java 7 switch statements. if (this.tag.equals("bn-IN")) { // Bengali sometimes has an English label if the Bengali script @@ -295,8 +301,11 @@ public class LocaleListPreference extends ListPreference { values[0] = ""; for (int i = 0; i < count; ++i) { - entries[i + 1] = descriptors[i].getDisplayName(); - values[i + 1] = descriptors[i].getTag(); + final String displayName = descriptors[i].getDisplayName(); + final String tag = descriptors[i].getTag(); + Log.v(LOG_TAG, displayName + " => " + tag); + entries[i + 1] = displayName; + values[i + 1] = tag; } setEntries(entries);