Use new InputManager API.

Change-Id: Ic521e4134e0aeb4d85e322b0a4f5bc925458b71f
This commit is contained in:
Jeff Brown
2012-04-09 15:26:17 -07:00
parent f8681d4c56
commit 99e94c0d0e
2 changed files with 2 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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;
}