diff options
author | 2012-06-05 16:33:21 +0900 | |
---|---|---|
committer | 2012-06-05 16:33:21 +0900 | |
commit | a6166d3776c810e51789bfdc19e4823acd4a2f18 (patch) | |
tree | 1de09d99160a9725b6d63ebd8d01898318fa7821 /java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java | |
parent | 7f7739fee82d6f2c240d0ed44e8948d09158f13a (diff) | |
download | latinime-a6166d3776c810e51789bfdc19e4823acd4a2f18.tar.gz latinime-a6166d3776c810e51789bfdc19e4823acd4a2f18.tar.xz latinime-a6166d3776c810e51789bfdc19e4823acd4a2f18.zip |
Fix a bug where Latin IME crashes on spell checker request
Bug: 6611183
Change-Id: I8a879feb598e1ac55d73f9cb27e54aa533d3a010
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); } |