aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-07-28 17:05:40 -0700
committerTadashi G. Takaoka <takaoka@google.com>2011-08-01 22:04:48 -0700
commit8da9a13760896cd78235b60d0ea680ea13620532 (patch)
treecb158b64dfcc32d3b5a65f31cc3441d6d3dc13a9 /tests/src
parent8d7782bf3c0bb44c96c1db42b438bb23b6580a44 (diff)
downloadlatinime-8da9a13760896cd78235b60d0ea680ea13620532.tar.gz
latinime-8da9a13760896cd78235b60d0ea680ea13620532.tar.xz
latinime-8da9a13760896cd78235b60d0ea680ea13620532.zip
Make Keyboard object immutable except shift state
This is the first step to implement suggestions pane as mini keyboard. Bug: 5023981 Change-Id: I90ffbde0fda19b4be68add449310997b56bf6904
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/android/inputmethod/latin/SuggestHelper.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/src/com/android/inputmethod/latin/SuggestHelper.java b/tests/src/com/android/inputmethod/latin/SuggestHelper.java
index 07d0e5d75..f9ea1805a 100644
--- a/tests/src/com/android/inputmethod/latin/SuggestHelper.java
+++ b/tests/src/com/android/inputmethod/latin/SuggestHelper.java
@@ -36,7 +36,7 @@ public class SuggestHelper {
// 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, keyboardId.mWidth);
+ mKeyboard = new LatinKeyboard.Builder(context).load(keyboardId).build();
mKeyDetector = new KeyDetector(0);
init();
}
@@ -44,7 +44,7 @@ public class SuggestHelper {
protected SuggestHelper(Context context, File dictionaryPath, long startOffset, long length,
KeyboardId keyboardId) {
mSuggest = new Suggest(context, dictionaryPath, startOffset, length, null);
- mKeyboard = new LatinKeyboard(context, keyboardId, keyboardId.mWidth);
+ mKeyboard = new LatinKeyboard.Builder(context).load(keyboardId).build();
mKeyDetector = new KeyDetector(0);
init();
}
@@ -54,7 +54,7 @@ public class SuggestHelper {
mSuggest.setCorrectionMode(Suggest.CORRECTION_FULL);
mKeyDetector.setKeyboard(mKeyboard, 0, 0);
mKeyDetector.setProximityCorrectionEnabled(true);
- mKeyDetector.setProximityThreshold(mKeyboard.getMostCommonKeyWidth());
+ mKeyDetector.setProximityThreshold(mKeyboard.mMostCommonKeyWidth);
}
public void setCorrectionMode(int correctionMode) {