aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputTestsBase.java
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2014-08-06 23:57:37 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-05 00:07:36 +0000
commit3316dcd453a824b3da40a25fc83a46867e2aec59 (patch)
tree75de8e01503dbe33636da019d422b3b0cdcfdc51 /tests/src/com/android/inputmethod/latin/InputTestsBase.java
parent868395c63708a9966d96e4be1d66efaeedd21b33 (diff)
parentf5f5fb4b6442f5a67ab5c4fb5610d4c8dff3d2b7 (diff)
downloadlatinime-3316dcd453a824b3da40a25fc83a46867e2aec59.tar.gz
latinime-3316dcd453a824b3da40a25fc83a46867e2aec59.tar.xz
latinime-3316dcd453a824b3da40a25fc83a46867e2aec59.zip
Merge "Revert "Introduce onEvent() to improve testability"" into lmp-dev
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/InputTestsBase.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/InputTestsBase.java10
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 */);
}