diff options
author | Jean Chalard <jchalard@google.com> | 2012-05-09 20:30:02 +0900 |
---|---|---|
committer | Jean Chalard <jchalard@google.com> | 2012-05-10 13:28:27 +0900 |
commit | f14002ca6be3029433e25152496d6c560243ee7a (patch) | |
tree | fd261e54958a2420ae49d28986a2a7f620ff48e0 /src/com/android/settings/inputmethod/UserDictionaryAddWordContents.java | |
parent | 5bdde7f93960d4f08a45aec14caaa88a310cca8c (diff) | |
download | packages_apps_Settings-f14002ca6be3029433e25152496d6c560243ee7a.zip packages_apps_Settings-f14002ca6be3029433e25152496d6c560243ee7a.tar.gz packages_apps_Settings-f14002ca6be3029433e25152496d6c560243ee7a.tar.bz2 |
Fix a bug with a duplicate entry
When going to the "all languages" dictionary and opening an
entry, the "all languages" entry would be listed twice.
Change-Id: Ie8cd7e9e824e95c05899b956905af6590b8929bc
Diffstat (limited to 'src/com/android/settings/inputmethod/UserDictionaryAddWordContents.java')
-rw-r--r-- | src/com/android/settings/inputmethod/UserDictionaryAddWordContents.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/settings/inputmethod/UserDictionaryAddWordContents.java b/src/com/android/settings/inputmethod/UserDictionaryAddWordContents.java index d33f8c3..68b5c48 100644 --- a/src/com/android/settings/inputmethod/UserDictionaryAddWordContents.java +++ b/src/com/android/settings/inputmethod/UserDictionaryAddWordContents.java @@ -184,7 +184,10 @@ public class UserDictionaryAddWordContents { // TODO: sort in unicode order addLocaleDisplayNameToList(activity, localesList, l); } - localesList.add(new LocaleRenderer(activity, "")); // meaning: all languages + if (!"".equals(mLocale)) { + // If mLocale is "", then we already inserted the "all languages" item, so don't do it + addLocaleDisplayNameToList(activity, localesList, ""); // meaning: all languages + } localesList.add(new LocaleRenderer(activity, null)); // meaning: select another locale return localesList; } |