aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-06-05 03:40:49 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-06-05 03:40:49 -0700
commitc750f9eb5398a30b207891e6858863f493875199 (patch)
tree8665b31ce584889f9631198d3422971683b43082 /java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
parent18c4137c878c18de24a406b861ddb2a735e02f7d (diff)
parenta6166d3776c810e51789bfdc19e4823acd4a2f18 (diff)
downloadlatinime-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.java10
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);
}