summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-05-10 00:29:21 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-10 00:29:21 -0700
commiteb995c7939d6c471d41e606fd3d886ba72fc1851 (patch)
tree5b16ec1d1a6d3da10e0643b98c5dcbc968606842
parentcfed94a65607fe9bb3387104c5368df31d73d04e (diff)
parentf14002ca6be3029433e25152496d6c560243ee7a (diff)
downloadpackages_apps_Settings-eb995c7939d6c471d41e606fd3d886ba72fc1851.zip
packages_apps_Settings-eb995c7939d6c471d41e606fd3d886ba72fc1851.tar.gz
packages_apps_Settings-eb995c7939d6c471d41e606fd3d886ba72fc1851.tar.bz2
Merge "Fix a bug with a duplicate entry" into jb-dev
-rw-r--r--src/com/android/settings/inputmethod/UserDictionaryAddWordContents.java5
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;
}