diff options
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Suggest.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index ca75866c0..33f9820cc 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -184,12 +184,17 @@ public class Suggest implements Dictionary.WordCallback { } /** - * Sets an optional contacts dictionary resource to be loaded. + * Sets an optional contacts dictionary resource to be loaded. It is also possible to remove + * the contacts dictionary by passing null to this method. In this case no contacts dictionary + * won't be used. */ public void setContactsDictionary(Dictionary contactsDictionary) { if (contactsDictionary != null) { mUnigramDictionaries.put(DICT_KEY_CONTACTS, contactsDictionary); mBigramDictionaries.put(DICT_KEY_CONTACTS, contactsDictionary); + } else { + mUnigramDictionaries.remove(DICT_KEY_CONTACTS); + mBigramDictionaries.remove(DICT_KEY_CONTACTS); } } |