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,
|
KeyEvent newEvent = new KeyEvent(downTime, eventTime, mAction, mKeyCode,
|
||||||
mRepeatCount, mMetaState, mDeviceId, mScancode,
|
mRepeatCount, mMetaState, mDeviceId, mScancode,
|
||||||
KeyEvent.FLAG_FROM_SYSTEM, InputDevice.SOURCE_KEYBOARD);
|
KeyEvent.FLAG_FROM_SYSTEM, InputDevice.SOURCE_KEYBOARD);
|
||||||
if (!InputManager.injectInputEvent(newEvent,
|
if (!InputManager.getInstance().injectInputEvent(newEvent,
|
||||||
InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_RESULT)) {
|
InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_RESULT)) {
|
||||||
return MonkeyEvent.INJECT_FAIL;
|
return MonkeyEvent.INJECT_FAIL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ public abstract class MonkeyMotionEvent extends MonkeyEvent {
|
|||||||
System.out.println(msg.toString());
|
System.out.println(msg.toString());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (!InputManager.injectInputEvent(me,
|
if (!InputManager.getInstance().injectInputEvent(me,
|
||||||
InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_RESULT)) {
|
InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_RESULT)) {
|
||||||
return MonkeyEvent.INJECT_FAIL;
|
return MonkeyEvent.INJECT_FAIL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user