Merge "Use new InputManager API."

This commit is contained in:
Jeff Brown
2012-04-10 19:06:14 -07:00
committed by Android (Google) Code Review
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;
}