Merge "Use new InputManager API."
This commit is contained in:
@@ -124,7 +124,7 @@ public class MonkeyKeyEvent extends MonkeyEvent {
|
||||
KeyEvent newEvent = new KeyEvent(downTime, eventTime, mAction, mKeyCode,
|
||||
mRepeatCount, mMetaState, mDeviceId, mScancode,
|
||||
KeyEvent.FLAG_FROM_SYSTEM, InputDevice.SOURCE_KEYBOARD);
|
||||
if (!InputManager.injectInputEvent(newEvent,
|
||||
if (!InputManager.getInstance().injectInputEvent(newEvent,
|
||||
InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_RESULT)) {
|
||||
return MonkeyEvent.INJECT_FAIL;
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ public abstract class MonkeyMotionEvent extends MonkeyEvent {
|
||||
System.out.println(msg.toString());
|
||||
}
|
||||
try {
|
||||
if (!InputManager.injectInputEvent(me,
|
||||
if (!InputManager.getInstance().injectInputEvent(me,
|
||||
InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_RESULT)) {
|
||||
return MonkeyEvent.INJECT_FAIL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user