diff options
author | 2013-08-12 20:37:53 -0700 | |
---|---|---|
committer | 2013-08-12 20:37:53 -0700 | |
commit | 1a8dfa8f1fd7dfe16794035a9878c5594da94925 (patch) | |
tree | 784b93c9fdb358fa6aa258746c07a540d6b66b81 /tests/src/com/android/inputmethod/latin/InputTestsBase.java | |
parent | 8b082decfcd5c83aafc363a567d1a7b2530c0615 (diff) | |
parent | e8264cab71af545a6124fc6137837b7459145d25 (diff) | |
download | latinime-1a8dfa8f1fd7dfe16794035a9878c5594da94925.tar.gz latinime-1a8dfa8f1fd7dfe16794035a9878c5594da94925.tar.xz latinime-1a8dfa8f1fd7dfe16794035a9878c5594da94925.zip |
am e8264cab: Utilize Keyboard.getKey(codePoint)
* commit 'e8264cab71af545a6124fc6137837b7459145d25':
Utilize Keyboard.getKey(codePoint)
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputTestsBase.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/InputTestsBase.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputTestsBase.java b/tests/src/com/android/inputmethod/latin/InputTestsBase.java index eb4f706cc..ead134b73 100644 --- a/tests/src/com/android/inputmethod/latin/InputTestsBase.java +++ b/tests/src/com/android/inputmethod/latin/InputTestsBase.java @@ -204,17 +204,16 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> { // view and only delegates to the parts of the code that care. So we don't include them here // 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); - for (final Key key : mKeyboard.mKeys) { - if (key.mCode == codePoint) { - final int x = key.mX + key.mWidth / 2; - final int y = key.mY + key.mHeight / 2; - mLatinIME.onCodeInput(codePoint, x, y); - return; - } + //mLatinIME.onPressKey(codePoint, 0 /* repeatCount */, true /* isSinglePointer */); + final Key key = mKeyboard.getKey(codePoint); + if (key != null) { + final int x = key.mX + key.mWidth / 2; + final int y = key.mY + key.mHeight / 2; + mLatinIME.onCodeInput(codePoint, x, y); + return; } mLatinIME.onCodeInput(codePoint, Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE); - //mLatinIME.onReleaseKey(codePoint, false); + //mLatinIME.onReleaseKey(codePoint, false /* withSliding */); } protected void type(final String stringToType) { |