diff options
author | 2012-03-05 23:25:29 -0800 | |
---|---|---|
committer | 2012-03-05 23:25:29 -0800 | |
commit | 231ef8fa3e6cf0961c62b2bf54300722ea3c9b64 (patch) | |
tree | 0e7674264b898af28dc559cdb79a72093b6e5779 /tests/src/com/android/inputmethod/latin/InputLogicTests.java | |
parent | d1dbdb6b20d05d4bae4272756c10776f075f6b55 (diff) | |
parent | ca7ec2097ca6af1505c1e6aa8b81b6068ba46dae (diff) | |
download | latinime-231ef8fa3e6cf0961c62b2bf54300722ea3c9b64.tar.gz latinime-231ef8fa3e6cf0961c62b2bf54300722ea3c9b64.tar.xz latinime-231ef8fa3e6cf0961c62b2bf54300722ea3c9b64.zip |
Merge "Integrate the logic to calculate the proximities"
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputLogicTests.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/InputLogicTests.java | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTests.java b/tests/src/com/android/inputmethod/latin/InputLogicTests.java index 50cccec5f..e3911f22f 100644 --- a/tests/src/com/android/inputmethod/latin/InputLogicTests.java +++ b/tests/src/com/android/inputmethod/latin/InputLogicTests.java @@ -51,29 +51,9 @@ public class InputLogicTests extends ServiceTestCase<LatinIME> { private LatinIME mLatinIME; private TextView mTextView; private InputConnection mInputConnection; - private HashMap<Integer, int[]> mProximity; public InputLogicTests() { super(LatinIME.class); - mProximity = createProximity(); - } - - private static HashMap<Integer, int[]> createProximity() { - final HashMap<Integer, int[]> proximity = new HashMap<Integer, int[]>(); - final int[] testProximity = SpellCheckerProximityInfo.getProximityForScript( - AndroidSpellCheckerService.SCRIPT_LATIN); - final int ROW_SIZE = SpellCheckerProximityInfo.ROW_SIZE; - final int NUL = SpellCheckerProximityInfo.NUL; - for (int row = 0; row * ROW_SIZE < testProximity.length; ++row) { - final int rowBase = row * ROW_SIZE; - int column; - for (column = 1; NUL != testProximity[rowBase + column]; ++column) { - // Do nothing, just search for a NUL element - } - proximity.put(testProximity[row * ROW_SIZE], - Arrays.copyOfRange(testProximity, rowBase, rowBase + column)); - } - return proximity; } // returns the previous setting value @@ -185,13 +165,9 @@ public class InputLogicTests extends ServiceTestCase<LatinIME> { // to keep these tests as pinpoint as possible and avoid bringing it too many dependencies, // but keep them in mind if something breaks. Commenting them out as is should work. //mLatinIME.onPressKey(codePoint); - int[] proximityKeys = mProximity.get(codePoint); - if (null == proximityKeys) { - proximityKeys = new int[] { codePoint }; - } - mLatinIME.onCodeInput(codePoint, proximityKeys, - KeyboardActionListener.NOT_A_TOUCH_COORDINATE, - KeyboardActionListener.NOT_A_TOUCH_COORDINATE); + mLatinIME.onCodeInput(codePoint, + KeyboardActionListener.SPELL_CHECKER_COORDINATE, + KeyboardActionListener.SPELL_CHECKER_COORDINATE); //mLatinIME.onReleaseKey(codePoint, false); } |