aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/SuggestHelper.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-12-15 14:45:14 +0900
committerTadashi G. Takaoka <takaoka@google.com>2011-12-16 20:10:57 +0900
commit645128af712961456a42cbcc34c0cdf5f0b40a83 (patch)
tree76bd95fdcffa8c443908ab15a78a92212e280a65 /tests/src/com/android/inputmethod/latin/SuggestHelper.java
parent13db05f93018f14b3695140bbed63a21b2d41bfe (diff)
downloadlatinime-645128af712961456a42cbcc34c0cdf5f0b40a83.tar.gz
latinime-645128af712961456a42cbcc34c0cdf5f0b40a83.tar.xz
latinime-645128af712961456a42cbcc34c0cdf5f0b40a83.zip
Move KeyboardSwitcher.getKeyboard to KeyboardSet
This change also gets rid of XML id from KeyboardId. Bug: 5002108 Bug: 5679585 Change-Id: I7086c7da3c01ba4ade7f77ee5cc731310da46404
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/SuggestHelper.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/SuggestHelper.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/src/com/android/inputmethod/latin/SuggestHelper.java b/tests/src/com/android/inputmethod/latin/SuggestHelper.java
index 06b192440..4d123e5d3 100644
--- a/tests/src/com/android/inputmethod/latin/SuggestHelper.java
+++ b/tests/src/com/android/inputmethod/latin/SuggestHelper.java
@@ -32,11 +32,13 @@ public class SuggestHelper {
protected final LatinKeyboard mKeyboard;
private final KeyDetector mKeyDetector;
+ public static final int ALPHABET_KEYBOARD = com.android.inputmethod.latin.R.xml.kbd_qwerty;
+
public SuggestHelper(Context context, int dictionaryId, KeyboardId keyboardId) {
// 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.Builder(context).load(keyboardId).build();
+ mKeyboard = new LatinKeyboard.Builder(context).load(ALPHABET_KEYBOARD, keyboardId).build();
mKeyDetector = new KeyDetector(0);
init();
}
@@ -45,7 +47,7 @@ public class SuggestHelper {
final long startOffset, final long length, final KeyboardId keyboardId,
final Locale locale) {
mSuggest = new Suggest(context, dictionaryPath, startOffset, length, null, locale);
- mKeyboard = new LatinKeyboard.Builder(context).load(keyboardId).build();
+ mKeyboard = new LatinKeyboard.Builder(context).load(ALPHABET_KEYBOARD, keyboardId).build();
mKeyDetector = new KeyDetector(0);
init();
}