aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/InputTestsBase.java
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2014-08-07 00:13:09 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-08-07 00:13:09 +0000
commit95d2c4fbedb0dd9139e12e8c427c957eeaa106b2 (patch)
tree01a2bdcfda8202941e0825adc309b8184da4130d /tests/src/com/android/inputmethod/latin/InputTestsBase.java
parentd34354ee6727b72cdb00e2895eed7f21e5772b25 (diff)
parentd5e4e367f21407da7a5f62a18e601957b07b6f4d (diff)
downloadlatinime-95d2c4fbedb0dd9139e12e8c427c957eeaa106b2.tar.gz
latinime-95d2c4fbedb0dd9139e12e8c427c957eeaa106b2.tar.xz
latinime-95d2c4fbedb0dd9139e12e8c427c957eeaa106b2.zip
am d5e4e367: am 3316dcd4: Merge "Revert "Introduce onEvent() to improve testability"" into lmp-dev
* commit 'd5e4e367f21407da7a5f62a18e601957b07b6f4d': 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.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 */);
}