Merge "Show all languages supported in LatinImeGoogle in InputLanguageSelection"
This commit is contained in:
commit
e0f35042a5
1 changed files with 30 additions and 24 deletions
|
@ -162,13 +162,20 @@ public class InputLanguageSelection extends PreferenceActivity {
|
|||
for (int i = 0 ; i < origSize; i++ ) {
|
||||
String s = locales[i];
|
||||
int len = s.length();
|
||||
String language = "";
|
||||
String country = "";
|
||||
if (len == 5) {
|
||||
String language = s.substring(0, 2);
|
||||
String country = s.substring(3, 5);
|
||||
language = s.substring(0, 2);
|
||||
country = s.substring(3, 5);
|
||||
} else if (len < 5) {
|
||||
language = s;
|
||||
}
|
||||
Locale l = new Locale(language, country);
|
||||
|
||||
// Exclude languages that are not relevant to LatinIME
|
||||
if (arrayContains(BLACKLIST_LANGUAGES, language)) continue;
|
||||
if (arrayContains(BLACKLIST_LANGUAGES, language) || TextUtils.isEmpty(language)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (finalSize == 0) {
|
||||
preprocess[finalSize++] =
|
||||
|
@ -195,7 +202,6 @@ public class InputLanguageSelection extends PreferenceActivity {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < finalSize ; i++) {
|
||||
uniqueLocales.add(preprocess[i]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue