diff options
author | 2012-06-05 03:40:49 -0700 | |
---|---|---|
committer | 2012-06-05 03:40:49 -0700 | |
commit | c750f9eb5398a30b207891e6858863f493875199 (patch) | |
tree | 8665b31ce584889f9631198d3422971683b43082 /java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java | |
parent | 18c4137c878c18de24a406b861ddb2a735e02f7d (diff) | |
parent | a6166d3776c810e51789bfdc19e4823acd4a2f18 (diff) | |
download | latinime-c750f9eb5398a30b207891e6858863f493875199.tar.gz latinime-c750f9eb5398a30b207891e6858863f493875199.tar.xz latinime-c750f9eb5398a30b207891e6858863f493875199.zip |
am a6166d37: Fix a bug where Latin IME crashes on spell checker request
* commit 'a6166d3776c810e51789bfdc19e4823acd4a2f18':
Fix a bug where Latin IME crashes on spell checker request
Diffstat (limited to 'java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java index 58e4d203c..8128779a4 100644 --- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java +++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java @@ -155,7 +155,9 @@ public class AndroidSpellCheckerService extends SpellCheckerService private void startUsingContactsDictionaryLocked() { if (null == mContactsDictionary) { if (LatinIME.USE_BINARY_CONTACTS_DICTIONARY) { - mContactsDictionary = new SynchronouslyLoadedContactsBinaryDictionary(this); + // TODO: use the right locale for each session + mContactsDictionary = + new SynchronouslyLoadedContactsBinaryDictionary(this, Locale.getDefault()); } else { mContactsDictionary = new SynchronouslyLoadedContactsDictionary(this); } @@ -436,7 +438,11 @@ public class AndroidSpellCheckerService extends SpellCheckerService // TODO: revert to the concrete type when USE_BINARY_CONTACTS_DICTIONARY is no // longer needed if (LatinIME.USE_BINARY_CONTACTS_DICTIONARY) { - mContactsDictionary = new SynchronouslyLoadedContactsBinaryDictionary(this); + // TODO: use the right locale. We can't do it right now because the + // spell checker is reusing the contacts dictionary across sessions + // without regard for their locale, so we need to fix that first. + mContactsDictionary = new SynchronouslyLoadedContactsBinaryDictionary(this, + Locale.getDefault()); } else { mContactsDictionary = new SynchronouslyLoadedContactsDictionary(this); } |