diff options
author | 2011-08-29 18:09:00 +0900 | |
---|---|---|
committer | 2011-08-29 18:33:20 +0900 | |
commit | f019d505d7da97c03c321eef02c4879c4e0448f6 (patch) | |
tree | 708dbaef2602718bef056fca8d4307bafd6d4b54 /java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java | |
parent | 940514989af9611ea8bac483e340799f8990319f (diff) | |
download | latinime-f019d505d7da97c03c321eef02c4879c4e0448f6.tar.gz latinime-f019d505d7da97c03c321eef02c4879c4e0448f6.tar.xz latinime-f019d505d7da97c03c321eef02c4879c4e0448f6.zip |
Fix a bug with synchronicity of spell checking/user dict
This fixes a race condition that would end up with the spell
checker not finding some words in the user dictionary when it
just booted.
Bug: 5194627
Change-Id: I1ba911cc53e6ae3b111d54a6f91d1d5feef3f5de
Diffstat (limited to 'java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java index 3244bcc65..a6a5b6dd6 100644 --- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java +++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java @@ -34,6 +34,7 @@ import com.android.inputmethod.latin.Dictionary.WordCallback; import com.android.inputmethod.latin.DictionaryCollection; import com.android.inputmethod.latin.DictionaryFactory; import com.android.inputmethod.latin.LocaleUtils; +import com.android.inputmethod.latin.SynchronouslyLoadedUserDictionary; import com.android.inputmethod.latin.UserDictionary; import com.android.inputmethod.latin.Utils; import com.android.inputmethod.latin.WordComposer; @@ -156,7 +157,7 @@ public class AndroidSpellCheckerService extends SpellCheckerService { final String localeStr = locale.toString(); Dictionary userDict = mUserDictionaries.get(localeStr); if (null == userDict) { - userDict = new UserDictionary(this, localeStr); + userDict = new SynchronouslyLoadedUserDictionary(this, localeStr); mUserDictionaries.put(localeStr, userDict); } dictionaryCollection.addDictionary(userDict); |