diff options
author | 2011-03-14 11:46:15 -0700 | |
---|---|---|
committer | 2011-03-18 12:16:50 -0700 | |
commit | cba93f50c3d46ada773ec49435689dc3e2094385 (patch) | |
tree | fc39bc20d316c6ff17af226e7f64a750edb1866e /tests/src/com/android/inputmethod/latin/SuggestHelper.java | |
parent | 9807ab27eac3a10b299382af8280eb54dca50608 (diff) | |
download | latinime-cba93f50c3d46ada773ec49435689dc3e2094385.tar.gz latinime-cba93f50c3d46ada773ec49435689dc3e2094385.tar.xz latinime-cba93f50c3d46ada773ec49435689dc3e2094385.zip |
Add different ways of reading the dictionary file.
This change adds basic support for an external dictionary provider.
It adds methods for reading the dictionary itself from an asset in
the dictionary provider package directly, obtaining the file name
through the ContentProvider interface; it also adds a way of getting
the data through an InputStream and copying the file locally.
Incidentally this change also adds the code needed to listen for
updating the dictionary provider package and reloading it in time.
This change also goes hand-in-hand with Iab31db6e, which implements
the small closed part of this.
Issue: 3414944
Change-Id: I5e4fff99a59bb99dbdb002102db6c90e6cb41c8a
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/SuggestHelper.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/SuggestHelper.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/src/com/android/inputmethod/latin/SuggestHelper.java b/tests/src/com/android/inputmethod/latin/SuggestHelper.java index aa7b76cc3..1d0a5b7eb 100644 --- a/tests/src/com/android/inputmethod/latin/SuggestHelper.java +++ b/tests/src/com/android/inputmethod/latin/SuggestHelper.java @@ -34,7 +34,9 @@ public class SuggestHelper { private final KeyDetector mKeyDetector; public SuggestHelper(Context context, int dictionaryId, KeyboardId keyboardId) { - mSuggest = new Suggest(context, dictionaryId); + // Use null as the locale for Suggest so as to force it to use the internal dictionary + // (and not try to find a dictionary provider for a specified locale) + mSuggest = new Suggest(context, dictionaryId, null); mKeyboard = new LatinKeyboard(context, keyboardId); mKeyDetector = new ProximityKeyDetector(); init(); |