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 09:54:58 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-06-05 09:54:58 -0700
commit5235e0cd9118bdb425dbfa9180d831c8ae6b9fb4 (patch)
tree8aaf6082f81227e1bcc04d5b10e62d522f3e9939 /java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
parentf93551f77b459f50329bd4008f2f70e7e67c3787 (diff)
parentc750f9eb5398a30b207891e6858863f493875199 (diff)
downloadlatinime-5235e0cd9118bdb425dbfa9180d831c8ae6b9fb4.tar.gz
latinime-5235e0cd9118bdb425dbfa9180d831c8ae6b9fb4.tar.xz
latinime-5235e0cd9118bdb425dbfa9180d831c8ae6b9fb4.zip
am c750f9eb: am a6166d37: Fix a bug where Latin IME crashes on spell checker request
* commit 'c750f9eb5398a30b207891e6858863f493875199': 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);
}