diff options
author | 2014-08-07 00:18:10 +0000 | |
---|---|---|
committer | 2014-08-07 00:18:10 +0000 | |
commit | 2bb2f81520256f6d730cd8553dd5fb5a6307af8c (patch) | |
tree | 667ec39315d15cc92744ff043b572ec5a81917c8 /tests/src/com/android/inputmethod/latin/InputTestsBase.java | |
parent | 47b9147d87fb9629362870fece08729537e9bb45 (diff) | |
parent | 95d2c4fbedb0dd9139e12e8c427c957eeaa106b2 (diff) | |
download | latinime-2bb2f81520256f6d730cd8553dd5fb5a6307af8c.tar.gz latinime-2bb2f81520256f6d730cd8553dd5fb5a6307af8c.tar.xz latinime-2bb2f81520256f6d730cd8553dd5fb5a6307af8c.zip |
am 95d2c4fb: am d5e4e367: am 3316dcd4: Merge "Revert "Introduce onEvent() to improve testability"" into lmp-dev
* commit '95d2c4fbedb0dd9139e12e8c427c957eeaa106b2':
Revert "Introduce onEvent() to improve testability"
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputTestsBase.java')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/InputTestsBase.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputTestsBase.java b/tests/src/com/android/inputmethod/latin/InputTestsBase.java index 18671fbe8..986fb1097 100644 --- a/tests/src/com/android/inputmethod/latin/InputTestsBase.java +++ b/tests/src/com/android/inputmethod/latin/InputTestsBase.java @@ -36,7 +36,6 @@ import android.widget.EditText; import android.widget.FrameLayout; import com.android.inputmethod.compat.InputMethodSubtypeCompatUtils; -import com.android.inputmethod.event.Event; import com.android.inputmethod.keyboard.Key; import com.android.inputmethod.keyboard.Keyboard; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; @@ -264,17 +263,14 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> { // but keep them in mind if something breaks. Commenting them out as is should work. //mLatinIME.onPressKey(codePoint, 0 /* repeatCount */, true /* isSinglePointer */); final Key key = mKeyboard.getKey(codePoint); - final Event event; if (key == null) { - event = Event.createSoftwareKeypressEvent(codePoint, Event.NOT_A_KEY_CODE, - Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE, isKeyRepeat); + mLatinIME.onCodeInput(codePoint, Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE, + isKeyRepeat); } else { final int x = key.getX() + key.getWidth() / 2; final int y = key.getY() + key.getHeight() / 2; - event = Event.createSoftwareKeypressEvent(codePoint, Event.NOT_A_KEY_CODE, - x, y, isKeyRepeat); + mLatinIME.onCodeInput(codePoint, x, y, isKeyRepeat); } - mLatinIME.onEvent(event); // Also see the comment at the top of this function about onReleaseKey //mLatinIME.onReleaseKey(codePoint, false /* withSliding */); } |