Lines Matching defs:inputSource
80 int inputSource = InputDevice.SOURCE_TOUCHSCREEN;
82 inputSource = InputDevice.SOURCE_TOUCHPAD;
89 sendTap(inputSource, Float.parseFloat(args[2]),
95 sendSwipe(inputSource, Float.parseFloat(args[2]),
169 private void sendTap(int inputSource, float x, float y) {
171 injectMotionEvent(inputSource, MotionEvent.ACTION_DOWN, now, x, y, 1.0f);
172 injectMotionEvent(inputSource, MotionEvent.ACTION_UP, now, x, y, 0.0f);
175 private void sendSwipe(int inputSource, float x1, float y1, float x2, float y2) {
178 injectMotionEvent(inputSource, MotionEvent.ACTION_DOWN, now, x1, y1, 1.0f);
181 injectMotionEvent(inputSource, MotionEvent.ACTION_MOVE, now, lerp(x1, x2, alpha),
184 injectMotionEvent(inputSource, MotionEvent.ACTION_UP, now, x1, y1, 0.0f);
190 * @param inputSource the InputDevice.SOURCE_* sending the input event
194 private void sendMove(int inputSource, float dx, float dy) {
196 injectMotionEvent(inputSource, MotionEvent.ACTION_MOVE, now, dx, dy, 0.0f);
208 * @param inputSource the InputDevice.SOURCE_* sending the input event
215 private void injectMotionEvent(int inputSource, int action, long when, float x, float y, float pressure) {
225 event.setSource(inputSource);