mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1019726 - Part 2: exclude Maithili from locale switcher on Android < 21. r=margaret
This commit is contained in:
parent
7375e28be3
commit
c4d78a35cc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user