aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2013-06-27 04:36:03 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-06-27 04:36:03 -0700
commit120a8da91c8a3b5cb67dbb98ee4d6f72b347052c (patch)
treecc20287dc9a4c9010e0b8a4f52b1a695a16cf62c /java
parent2221b89564d4f32880effb825ec2a2beb643ad99 (diff)
parent4ded1af21097652dcd0750d9b3f2f24df2904e25 (diff)
downloadlatinime-120a8da91c8a3b5cb67dbb98ee4d6f72b347052c.tar.gz
latinime-120a8da91c8a3b5cb67dbb98ee4d6f72b347052c.tar.xz
latinime-120a8da91c8a3b5cb67dbb98ee4d6f72b347052c.zip
am 4ded1af2: Improve the language list in the personal dictionary
* commit '4ded1af21097652dcd0750d9b3f2f24df2904e25': Improve the language list in the personal dictionary
Diffstat (limited to 'java')
-rw-r--r--java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryList.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryList.java b/java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryList.java
index be5f11620..37c390d13 100644
--- a/java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryList.java
+++ b/java/src/com/android/inputmethod/latin/userdictionary/UserDictionaryList.java
@@ -58,7 +58,6 @@ public class UserDictionaryList extends PreferenceFragment {
new String[] { UserDictionary.Words.LOCALE },
null, null, null);
final TreeSet<String> localeSet = new TreeSet<String>();
- boolean addedAllLocale = false;
if (null == cursor) {
// The user dictionary service is not present or disabled. Return null.
return null;
@@ -66,14 +65,10 @@ public class UserDictionaryList extends PreferenceFragment {
final int columnIndex = cursor.getColumnIndex(UserDictionary.Words.LOCALE);
do {
final String locale = cursor.getString(columnIndex);
- final boolean allLocale = TextUtils.isEmpty(locale);
- localeSet.add(allLocale ? "" : locale);
- if (allLocale) {
- addedAllLocale = true;
- }
+ localeSet.add(null != locale ? locale : "");
} while (cursor.moveToNext());
}
- if (!UserDictionarySettings.IS_SHORTCUT_API_SUPPORTED && !addedAllLocale) {
+ if (!UserDictionarySettings.IS_SHORTCUT_API_SUPPORTED) {
// For ICS, we need to show "For all languages" in case that the keyboard locale
// is different from the system locale
localeSet.add("");