aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/InputLanguageSelection.java
diff options
context:
space:
mode:
authorsatok <satok@google.com>2010-11-18 09:55:23 +0900
committersatok <satok@google.com>2010-11-19 08:30:02 +0900
commit4ab730dbd34fad323063f2ffd31ce33de746668d (patch)
treef2efd61ab1141e01bba0afdaa82459d325528f44 /java/src/com/android/inputmethod/latin/InputLanguageSelection.java
parent279da1da91681923f2eba3d5e3d82f9ad87cd4b6 (diff)
downloadlatinime-4ab730dbd34fad323063f2ffd31ce33de746668d.tar.gz
latinime-4ab730dbd34fad323063f2ffd31ce33de746668d.tar.xz
latinime-4ab730dbd34fad323063f2ffd31ce33de746668d.zip
Add a functionarity to handle Subtype
Change-Id: Ic6055ba218b64f4276e3db99a435f546c3990ee5
Diffstat (limited to 'java/src/com/android/inputmethod/latin/InputLanguageSelection.java')
-rw-r--r--java/src/com/android/inputmethod/latin/InputLanguageSelection.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/InputLanguageSelection.java b/java/src/com/android/inputmethod/latin/InputLanguageSelection.java
index 4f4f7e3a7..7f64bcb43 100644
--- a/java/src/com/android/inputmethod/latin/InputLanguageSelection.java
+++ b/java/src/com/android/inputmethod/latin/InputLanguageSelection.java
@@ -37,7 +37,7 @@ public class InputLanguageSelection extends PreferenceActivity {
private String mSelectedLanguages;
private ArrayList<Loc> mAvailableLanguages = new ArrayList<Loc>();
private static final String[] BLACKLIST_LANGUAGES = {
- "ko", "ja", "zh", "el"
+ "ko", "ja", "zh", "el", "zz"
};
private static class Loc implements Comparable<Object> {
@@ -74,7 +74,7 @@ public class InputLanguageSelection extends PreferenceActivity {
for (int i = 0; i < mAvailableLanguages.size(); i++) {
CheckBoxPreference pref = new CheckBoxPreference(this);
Locale locale = mAvailableLanguages.get(i).locale;
- pref.setTitle(SubtypeSwitcher.getLanguageName(locale));
+ pref.setTitle(SubtypeSwitcher.getFullDisplayName(locale, true));
boolean checked = isLocaleIn(locale, languageList);
pref.setChecked(checked);
if (hasDictionary(locale)) {
@@ -167,7 +167,7 @@ public class InputLanguageSelection extends PreferenceActivity {
if (finalSize == 0) {
preprocess[finalSize++] =
- new Loc(SubtypeSwitcher.getLanguageName(l), l);
+ new Loc(SubtypeSwitcher.getFullDisplayName(l, true), l);
} else {
// check previous entry:
// same lang and a country -> upgrade to full name and
@@ -175,15 +175,15 @@ public class InputLanguageSelection extends PreferenceActivity {
// diff lang -> insert ours with lang-only name
if (preprocess[finalSize-1].locale.getLanguage().equals(
language)) {
- preprocess[finalSize-1].label = SubtypeSwitcher.getLanguageName(
- preprocess[finalSize-1].locale);
+ preprocess[finalSize-1].label = SubtypeSwitcher.getFullDisplayName(
+ preprocess[finalSize-1].locale, false);
preprocess[finalSize++] =
- new Loc(SubtypeSwitcher.getLanguageName(l), l);
+ new Loc(SubtypeSwitcher.getFullDisplayName(l, false), l);
} else {
String displayName;
if (s.equals("zz_ZZ")) {
} else {
- displayName = SubtypeSwitcher.getLanguageName(l);
+ displayName = SubtypeSwitcher.getFullDisplayName(l, true);
preprocess[finalSize++] = new Loc(displayName, l);
}
}