From f14002ca6be3029433e25152496d6c560243ee7a Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Wed, 9 May 2012 20:30:02 +0900 Subject: [PATCH] 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 --- .../settings/inputmethod/UserDictionaryAddWordContents.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/inputmethod/UserDictionaryAddWordContents.java b/src/com/android/settings/inputmethod/UserDictionaryAddWordContents.java index d33f8c34a07..68b5c482f39 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; }