Home
last modified time | relevance | path

Searched refs:downEvent (Results 1 – 25 of 27) sorted by relevance

12

/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/magnification/
DMagnificationGesturesObserverTest.java90 final MotionEvent downEvent = TouchEventGenerator.downEvent(Display.DEFAULT_DISPLAY, in onActionDown_shouldNotDetection_onGestureCanceled() local
93 mObserver.onMotionEvent(downEvent, downEvent, 0); in onActionDown_shouldNotDetection_onGestureCanceled()
96 mEventInfoArgumentCaptor.capture(), argThat(new MotionEventMatcher(downEvent))); in onActionDown_shouldNotDetection_onGestureCanceled()
97 verifyCacheMotionEvents(mEventInfoArgumentCaptor.getValue(), downEvent); in onActionDown_shouldNotDetection_onGestureCanceled() local
102 final MotionEvent downEvent = TouchEventGenerator.downEvent(Display.DEFAULT_DISPLAY, in onMotionEvent_unrecognizedEvents_onDetectionCanceledAfterTimeout() local
107 mObserver.onMotionEvent(downEvent, downEvent, 0); in onMotionEvent_unrecognizedEvents_onDetectionCanceledAfterTimeout()
109 verify(mCallback, timeout(timeoutMillis)).onGestureCancelled(eq(downEvent.getDownTime()), in onMotionEvent_unrecognizedEvents_onDetectionCanceledAfterTimeout()
110 mEventInfoArgumentCaptor.capture(), argThat(new MotionEventMatcher(downEvent))); in onMotionEvent_unrecognizedEvents_onDetectionCanceledAfterTimeout()
111 verifyCacheMotionEvents(mEventInfoArgumentCaptor.getValue(), downEvent); in onMotionEvent_unrecognizedEvents_onDetectionCanceledAfterTimeout() local
116 final MotionEvent downEvent = TouchEventGenerator.downEvent(Display.DEFAULT_DISPLAY, in sendEventsOfSwiping_onGestureCompleted() local
[all …]
DSimpleSwipeTest.java66 final MotionEvent downEvent = TouchEventGenerator.downEvent(Display.DEFAULT_DISPLAY, in sendSingleDownEvent_onGestureCanceledAfterTimeout() local
72 mGesturesObserver.onMotionEvent(downEvent, downEvent, 0); in sendSingleDownEvent_onGestureCanceledAfterTimeout()
82 final MotionEvent downEvent = TouchEventGenerator.downEvent(Display.DEFAULT_DISPLAY, in sendSwipeEvent_onGestureCompleted() local
88 mGesturesObserver.onMotionEvent(downEvent, downEvent, 0); in sendSwipeEvent_onGestureCompleted()
98 final MotionEvent downEvent = TouchEventGenerator.downEvent(Display.DEFAULT_DISPLAY, in sendSingleTapEvent_onGestureCanceled() local
104 mGesturesObserver.onMotionEvent(downEvent, downEvent, 0); in sendSingleTapEvent_onGestureCanceled()
DMagnificationGestureHandlerTest.java65 final MotionEvent downEvent = MotionEvent.obtain(0, 0, ACTION_DOWN, 0, 0, 0); in onMotionEvent_isFromScreen_onMotionEventInternal() local
66 downEvent.setSource(InputDevice.SOURCE_TOUCHSCREEN); in onMotionEvent_isFromScreen_onMotionEventInternal()
68 mMgh.onMotionEvent(downEvent, downEvent, /* policyFlags= */ 0); in onMotionEvent_isFromScreen_onMotionEventInternal()
73 downEvent.recycle(); in onMotionEvent_isFromScreen_onMotionEventInternal()
79 final MotionEvent downEvent = MotionEvent.obtain(0, 0, ACTION_DOWN, 0, 0, 0); in onMotionEvent_downEvent_handleInteractionStart() local
80 downEvent.setSource(InputDevice.SOURCE_TOUCHSCREEN); in onMotionEvent_downEvent_handleInteractionStart()
82 mMgh.onMotionEvent(downEvent, downEvent, /* policyFlags= */ 0); in onMotionEvent_downEvent_handleInteractionStart()
87 downEvent.recycle(); in onMotionEvent_downEvent_handleInteractionStart()
DTwoFingersDownOrSwipeTest.java78 final MotionEvent downEvent = TouchEventGenerator.downEvent(Display.DEFAULT_DISPLAY, in sendSingleDownEvent_GestureCanceledAfterTimeout() local
81 mGesturesObserver.onMotionEvent(downEvent, downEvent, 0); in sendSingleDownEvent_GestureCanceledAfterTimeout()
103 final MotionEvent downEvent = TouchEventGenerator.downEvent(Display.DEFAULT_DISPLAY, in sendSingleTapEvent_onGestureCancelled() local
108 mGesturesObserver.onMotionEvent(downEvent, downEvent, 0); in sendSingleTapEvent_onGestureCancelled()
DFullScreenMagnificationGestureHandlerTest.java262 send(downEvent()); in testAlternativeTransitions_areWorking()
294 send(downEvent()); in testNonTransitions_dontChangeState()
359 send(downEvent()); in testTwoFingersOneTap_zoomedState_dispatchMotionEvents()
384 send(downEvent()); in testThreeFingersOneTap_zoomedState_dispatchMotionEvents()
410 send(downEvent()); in testFirstFingerSwipe_TwoPinterDownAndZoomedState_panningState()
428 send(downEvent()); in testSecondFingerSwipe_TwoPinterDownAndZoomedState_panningState()
600 send(downEvent());
605 send(downEvent());
614 send(downEvent());
698 send(downEvent());
[all …]
DWindowMagnificationGestureHandlerTest.java220 for (MotionEvent downEvent: motionEvents) { in goFromStateIdleTo()
221 send(downEvent); in goFromStateIdleTo()
301 private MotionEvent downEvent(float x, float y) { in downEvent() method in WindowMagnificationGestureHandlerTest
302 return TouchEventGenerator.downEvent(DISPLAY_0, x, y); in downEvent()
310 send(downEvent(DEFAULT_TAP_X, DEFAULT_TAP_Y)); in tap()
/frameworks/base/core/tests/coretests/src/android/widget/espresso/
DDragAction.java70 MotionEvent downEvent = MotionEvents.sendDown(
73 return downEvent;
136 MotionEvent downEvent = MotionEvents.sendDown(
171 MotionEvent downEvent = MotionEvents.sendDown(
176 if (!MotionEvents.sendUp(uiController, downEvent)) {
180 MotionEvents.sendCancel(uiController, downEvent);
187 downEvent.recycle();
189 downEvent = MotionEvents.sendDown(
192 return downEvent;
223 MotionEvent downEvent = MotionEvents.sendDown(
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/accessibility/
DMagnificationGestureDetectorTest.java79 final MotionEvent downEvent = mMotionEventHelper.obtainMotionEvent(downTime, downTime, in onActionDown_invokeDownCallback() local
82 mGestureDetector.onTouch(downEvent); in onActionDown_invokeDownCallback()
90 final MotionEvent downEvent = mMotionEventHelper.obtainMotionEvent(downTime, downTime, in performSingleTap_invokeCallbacksInOrder() local
95 mGestureDetector.onTouch(downEvent); in performSingleTap_invokeCallbacksInOrder()
108 final MotionEvent downEvent = mMotionEventHelper.obtainMotionEvent(downTime, downTime, in performSingleTapWithActionCancel_notInvokeOnSingleTapCallback() local
113 mGestureDetector.onTouch(downEvent); in performSingleTapWithActionCancel_notInvokeOnSingleTapCallback()
122 final MotionEvent downEvent = mMotionEventHelper.obtainMotionEvent(downTime, downTime, in performSingleTapWithTwoPointers_notInvokeSingleTapCallback() local
127 mGestureDetector.onTouch(downEvent); in performSingleTapWithTwoPointers_notInvokeSingleTapCallback()
136 final MotionEvent downEvent = mMotionEventHelper.obtainMotionEvent(downTime, downTime, in performLongPress_invokeCallbacksInOrder() local
141 mGestureDetector.onTouch(downEvent); in performLongPress_invokeCallbacksInOrder()
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/
DEditorTouchStateTest.java64 MotionEvent event1 = downEvent(event1Time, event1Time, 20f, 30f); in testUpdate_singleTap()
76 MotionEvent event3 = downEvent(event3Time, event3Time, 22f, 33f); in testUpdate_singleTap()
85 MotionEvent event1 = downEvent(event1Time, event1Time, 20f, 30f); in testUpdate_doubleTap_sameArea()
97 MotionEvent event3 = downEvent(event3Time, event3Time, 22f, 33f); in testUpdate_doubleTap_sameArea()
107 MotionEvent event1 = downEvent(event1Time, event1Time, 20f, 30f); in testUpdate_doubleTap_notSameArea()
119 MotionEvent event3 = downEvent(event3Time, event3Time, 200f, 300f); in testUpdate_doubleTap_notSameArea()
136 MotionEvent event1 = downEvent(event1Time, event1Time, 20f, 30f); in testUpdate_doubleTap_delayAfterFirstDownEvent()
151 MotionEvent event3 = downEvent(event3Time, event3Time, 22f, 33f); in testUpdate_doubleTap_delayAfterFirstDownEvent()
160 MotionEvent event1 = downEvent(event1Time, event1Time, 20f, 30f); in testUpdate_quickTapAfterDrag()
181 MotionEvent event4 = downEvent(event4Time, event4Time, 200f, 31f); in testUpdate_quickTapAfterDrag()
[all …]
DEditorCursorDragTest.java296 MotionEvent event1 = downEvent(tv, event1Time, event1Time, 5f, 10f); in testEditor_onTouchEvent_quickTapAfterDrag()
321 MotionEvent event5 = downEvent(tv, event5Time, event5Time, 90f, 10f); in testEditor_onTouchEvent_quickTapAfterDrag()
334 MotionEvent event7 = downEvent(tv, event7Time, event7Time, 90f, 10f); in testEditor_onTouchEvent_quickTapAfterDrag()
380 MotionEvent event1 = downEvent(tv, event1Time, event1Time, 20f, 30f); in testEditor_onTouchEvent_cursorDrag()
415 MotionEvent event1 = downEvent(tv, event1Time, event1Time, 20f, 30f); in testEditor_onTouchEvent_selectionDrag()
427 MotionEvent event3 = downEvent(tv, event3Time, event3Time, 20f, 30f); in testEditor_onTouchEvent_selectionDrag()
456 MotionEvent event1 = downEvent(tv, event1Time, event1Time, 20f, 30f); in testCursorDrag_nonSelectableTextView()
580 dispatchTouchEvent(handleView, downEvent(handleView, handleDownTime, eventTime++, 0, 0)); in testCursorDrag_multiTouch()
655 dispatchTouchEvent(tv, downEvent(tv, downTime, downTime, x, y)); in tapAtPoint()
668 dispatchTouchEvent(view, downEvent(view, downTime, eventTime++, startX, startY)); in dragDownUntilLineChange()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/gestures/
DGesturesObserverTest.java84 final MotionEvent downEvent = TouchEventGenerator.downEvent(Display.DEFAULT_DISPLAY, in onMotionEvent_unrecognizedEvents_onGestureCancelledAfterTimeout() local
88 mGesturesObserver.onMotionEvent(downEvent, downEvent, 0); in onMotionEvent_unrecognizedEvents_onGestureCancelledAfterTimeout()
98 final MotionEvent downEvent = TouchEventGenerator.downEvent(Display.DEFAULT_DISPLAY, in onMotionEvent_recognizedEvents_onGestureCompleted() local
104 mGesturesObserver.onMotionEvent(downEvent, downEvent, 0); in onMotionEvent_recognizedEvents_onGestureCompleted()
DTouchExplorerTest.java202 send(downEvent(DEFAULT_X + 10, DEFAULT_Y + 10)); in testClick_afterCanceledDoubleTapAndHold_eventLocationIsCorrect()
209 fromTouchscreen(downEvent(DEFAULT_X + 100, DEFAULT_Y + 100)); in testClick_afterCanceledDoubleTapAndHold_eventLocationIsCorrect()
217 send(downEvent()); in testClick_afterCanceledDoubleTapAndHold_eventLocationIsCorrect()
270 send(downEvent()); in testFlickCrossViews_clearStateAndExpectedEvents()
387 send(downEvent()); in testCanceledGesture_shouldDoNothing()
486 send(downEvent()); in goFromStateClearTo()
603 private MotionEvent downEvent(float x, float y) { in downEvent() method in TouchExplorerTest
609 private MotionEvent downEvent() { in downEvent() method in TouchExplorerTest
/frameworks/base/services/accessibility/java/com/android/server/accessibility/magnification/
DTwoFingersDownOrSwipe.java113 private static double distance(@NonNull MotionEvent downEvent, @NonNull MotionEvent moveEvent) { in distance() argument
114 final int downActionIndex = downEvent.getActionIndex(); in distance()
115 final int downPointerId = downEvent.getPointerId(downActionIndex); in distance()
120 return MathUtils.dist(downEvent.getX(downActionIndex), downEvent.getY(downActionIndex), in distance()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/biometrics/
DUdfpsControllerTest.java273 MotionEvent downEvent = MotionEvent.obtain(0, 0, MotionEvent.ACTION_DOWN, 0, 0, 0); in onActionDownTouch_whenCanDismissLockScreen_entersDevice() local
274 mTouchListenerCaptor.getValue().onTouch(mUdfpsView, downEvent); in onActionDownTouch_whenCanDismissLockScreen_entersDevice()
275 downEvent.recycle(); in onActionDownTouch_whenCanDismissLockScreen_entersDevice()
386 MotionEvent downEvent = MotionEvent.obtain(0, 0, MotionEvent.ACTION_DOWN, 0, 0, 0); in onMultipleTouch_whenCanDismissLockScreen_entersDeviceOnce() local
387 mTouchListenerCaptor.getValue().onTouch(mUdfpsView, downEvent); in onMultipleTouch_whenCanDismissLockScreen_entersDeviceOnce()
388 downEvent.recycle(); in onMultipleTouch_whenCanDismissLockScreen_entersDeviceOnce()
441 MotionEvent downEvent = MotionEvent.obtain(0, 0, MotionEvent.ACTION_DOWN, 0, 0, 0); in fingerDown() local
442 mTouchListenerCaptor.getValue().onTouch(mUdfpsView, downEvent); in fingerDown()
443 downEvent.recycle(); in fingerDown()
533 MotionEvent downEvent = MotionEvent.obtain(0, 0, MotionEvent.ACTION_DOWN, 0, 0, 0); in playHapticOnTouchUdfpsArea() local
[all …]
/frameworks/base/tests/Input/src/com/android/test/input/
DAnrTest.kt86 val downEvent = MotionEvent.obtain(downTime, downTime, in testGestureMonitorAnr() constant
88 downEvent.source = InputDevice.SOURCE_TOUCHSCREEN in testGestureMonitorAnr()
90 mInstrumentation.uiAutomation.injectInputEvent(downEvent, false /* sync*/) in testGestureMonitorAnr()
/frameworks/base/services/accessibility/java/com/android/server/accessibility/
DAutoclickController.java420 MotionEvent downEvent = MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN, 1, in sendClick() local
426 MotionEvent upEvent = MotionEvent.obtain(downEvent); in sendClick()
429 AutoclickController.super.onMotionEvent(downEvent, downEvent, mEventPolicyFlags); in sendClick()
430 downEvent.recycle(); in sendClick()
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/
DAccessibilityInputFilterTest.java235 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldDispatchToCorrespondingEventHandlers()
236 send(downEvent(SECOND_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldDispatchToCorrespondingEventHandlers()
252 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldClearEventsForAllEventHandlers()
253 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldClearEventsForAllEventHandlers()
258 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_MOUSE)); in testInputEvent_shouldClearEventsForAllEventHandlers()
344 private MotionEvent downEvent(int displayId, int source) { in downEvent() method in AccessibilityInputFilterTest
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/utils/
DTouchEventGenerator.java38 public static MotionEvent downEvent(int displayId, float x, float y) { in downEvent() method in TouchEventGenerator
67 final MotionEvent downEvent = generateMultiplePointersEvent(displayId, in twoPointersDownEvents() local
69 downEvents.add(downEvent); in twoPointersDownEvents()
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/
DPipResizeGestureHandlerTest.java127 MotionEvent downEvent = in twoInput_triggersPinchResize_getBigger() local
129 assertTrue(mPipResizeGestureHandler.willStartResizeGesture(downEvent)); in twoInput_triggersPinchResize_getBigger()
168 MotionEvent downEvent = in twoInput_triggersPinchResize_getSmaller() local
170 assertTrue(mPipResizeGestureHandler.willStartResizeGesture(downEvent)); in twoInput_triggersPinchResize_getSmaller()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/accessibility/floatingmenu/
DAccessibilityFloatingMenuViewTest.java270 final MotionEvent downEvent = in tapOnAndDragMenu_interceptUpEvent() local
288 listView.dispatchTouchEvent(downEvent); in tapOnAndDragMenu_interceptUpEvent()
306 final MotionEvent downEvent = in tapOnAndDragMenu_matchLocation() local
324 listView.dispatchTouchEvent(downEvent); in tapOnAndDragMenu_matchLocation()
345 final MotionEvent downEvent = in tapOnAndDragMenuToScreenSide_transformShapeHalfOval() local
363 listView.dispatchTouchEvent(downEvent); in tapOnAndDragMenuToScreenSide_transformShapeHalfOval()
/frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/ui/automation/
DInteraction.java115 MotionEvent downEvent = MotionEvent.obtain( in createInterpolatedEventList() local
117 result.add(downEvent); in createInterpolatedEventList()
/frameworks/base/cmds/uiautomator/library/core-src/com/android/uiautomator/core/
DInteractionController.java190 KeyEvent downEvent = new KeyEvent(eventTime, eventTime, KeyEvent.ACTION_DOWN, in sendKeyAndWaitForEvent()
193 if (injectEventSync(downEvent)) { in sendKeyAndWaitForEvent()
547 KeyEvent downEvent = new KeyEvent(eventTime, eventTime, KeyEvent.ACTION_DOWN,
550 if (injectEventSync(downEvent)) {
/frameworks/base/services/accessibility/java/com/android/server/accessibility/gestures/
DTouchExplorer.java664 MotionEvent downEvent = computeDownEventForDrag(event); in handleActionMoveStateTouchInteracting() local
665 if (downEvent != null) { in handleActionMoveStateTouchInteracting()
667 downEvent, ACTION_DOWN, rawEvent, pointerIdBits, policyFlags); in handleActionMoveStateTouchInteracting()
1105 MotionEvent downEvent = in computeDownEventForDrag() local
1122 return downEvent; in computeDownEventForDrag()
/frameworks/base/core/java/android/app/
DInstrumentation.java992 … final KeyEvent downEvent = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_CENTER); in invokeContextMenuAction() local
993 sendKeySync(downEvent); in invokeContextMenuAction()
/frameworks/base/services/core/java/com/android/server/media/
DMediaSessionService.java2746 KeyEvent downEvent = KeyEvent.changeAction(keyEvent, KeyEvent.ACTION_DOWN); in dispatchDownAndUpKeyEventsLocked() local
2749 asSystemService, downEvent, stream, musicOnly); in dispatchDownAndUpKeyEventsLocked()
2753 dispatchMediaKeyEventLocked(packageName, pid, uid, asSystemService, downEvent, in dispatchDownAndUpKeyEventsLocked()

12