diff options
author | 2014-08-06 23:57:03 +0000 | |
---|---|---|
committer | 2014-08-06 23:57:03 +0000 | |
commit | f5f5fb4b6442f5a67ab5c4fb5610d4c8dff3d2b7 (patch) | |
tree | a52bf89695bb0a5cb5c4bd897e39f0b485706845 /tests/src/com/android/inputmethod/latin/InputTestsBase.java | |
parent | ef74e737f580f7ac0b3bd70d6255dde3c87d9078 (diff) | |
download | latinime-f5f5fb4b6442f5a67ab5c4fb5610d4c8dff3d2b7.tar.gz latinime-f5f5fb4b6442f5a67ab5c4fb5610d4c8dff3d2b7.tar.xz latinime-f5f5fb4b6442f5a67ab5c4fb5610d4c8dff3d2b7.zip |
Revert "Introduce onEvent() to improve testability"
This reverts commit ef74e737f580f7ac0b3bd70d6255dde3c87d9078.
Apparently, this CL broke several unit tests.
Change-Id: I86cf5f1ffb0214707afe99ee97f92ba8c5157f3f
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 */); } |