/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/magnification/ |
D | MagnificationGesturesObserverTest.java | 90 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 …]
|
D | SimpleSwipeTest.java | 66 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()
|
D | MagnificationGestureHandlerTest.java | 71 final MotionEvent downEvent = MotionEvent.obtain(0, 0, ACTION_DOWN, 0, 0, 0); in onMotionEvent_isFromScreen_onMotionEventInternal() local 72 downEvent.setSource(InputDevice.SOURCE_TOUCHSCREEN); in onMotionEvent_isFromScreen_onMotionEventInternal() 74 mMgh.onMotionEvent(downEvent, downEvent, /* policyFlags= */ 0); in onMotionEvent_isFromScreen_onMotionEventInternal() 79 downEvent.recycle(); in onMotionEvent_isFromScreen_onMotionEventInternal() 85 final MotionEvent downEvent = MotionEvent.obtain(0, 0, ACTION_DOWN, 0, 0, 0); in onMotionEvent_downEvent_handleInteractionStart() local 86 downEvent.setSource(InputDevice.SOURCE_TOUCHSCREEN); in onMotionEvent_downEvent_handleInteractionStart() 88 mMgh.onMotionEvent(downEvent, downEvent, /* policyFlags= */ 0); in onMotionEvent_downEvent_handleInteractionStart() 93 downEvent.recycle(); in onMotionEvent_downEvent_handleInteractionStart()
|
D | TwoFingersDownOrSwipeTest.java | 87 final MotionEvent downEvent = TouchEventGenerator.downEvent(Display.DEFAULT_DISPLAY, in sendSingleDownEvent_GestureCanceledAfterTimeout() local 90 mGesturesObserver.onMotionEvent(downEvent, downEvent, 0); in sendSingleDownEvent_GestureCanceledAfterTimeout() 130 final MotionEvent downEvent = TouchEventGenerator.downEvent(Display.DEFAULT_DISPLAY, in sendSingleTapEvent_onGestureCancelled() local 135 mGesturesObserver.onMotionEvent(downEvent, downEvent, 0); in sendSingleTapEvent_onGestureCancelled()
|
D | FullScreenMagnificationGestureHandlerTest.java | 390 send(downEvent()); in testAlternativeTransitions_areWorking() 445 send(downEvent()); in testNonTransitions_dontChangeState() 629 send(downEvent()); in testTwoFingerTap_StateIsActivated_shouldInDelegating() 645 send(downEvent()); in testTwoFingerTap_StateIsIdle_shouldInDelegating() 678 send(downEvent()); in testTwoFingersOneTap_activatedState_dispatchMotionEvents() 712 send(downEvent()); in testThreeFingersOneTap_activatedState_dispatchMotionEvents() 739 send(downEvent()); in testFirstFingerSwipe_twoPointerDownAndActivatedState_panningState() 757 send(downEvent()); in testSecondFingerSwipe_twoPointerDownAndActivatedState_shouldInPanningState() 776 send(downEvent()); in testTowFingerSwipe_twoPointerDownAndShortcutTriggeredState_shouldInPanningState() 795 send(downEvent()); in testSecondFingerSwipe_twoPointerDownAndActivatedState_panningState() [all …]
|
D | WindowMagnificationGestureHandlerTest.java | 310 for (MotionEvent downEvent: motionEvents) { in goFromStateIdleTo() 311 send(downEvent); in goFromStateIdleTo() 443 private MotionEvent downEvent(float x, float y) { in downEvent() method in WindowMagnificationGestureHandlerTest 444 return TouchEventGenerator.downEvent(DISPLAY_0, x, y); in downEvent() 462 send(downEvent(DEFAULT_TAP_X, DEFAULT_TAP_Y)); in tap() 467 send(downEvent(DEFAULT_TAP_X, DEFAULT_TAP_Y)); in tapAndHold() 472 send(downEvent(DEFAULT_TAP_X, DEFAULT_TAP_Y)); in twoFingerTap() 479 send(downEvent(DEFAULT_TAP_X, DEFAULT_TAP_Y)); in twoFingerTapAndHold()
|
/frameworks/base/core/tests/coretests/src/android/widget/espresso/ |
D | DragAction.java | 70 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/apct-tests/perftests/core/src/android/view/ |
D | HandwritingInitiatorPerfTest.java | 75 final MotionEvent downEvent = in onTouchEvent_actionDown_toolTypeStylus() local 81 mHandwritingInitiator.onTouchEvent(downEvent); in onTouchEvent_actionDown_toolTypeStylus() 91 final MotionEvent downEvent = in onTouchEvent_actionUp_toolTypeStylus() local 98 mHandwritingInitiator.onTouchEvent(downEvent); in onTouchEvent_actionUp_toolTypeStylus() 109 final MotionEvent downEvent = in onTouchEvent_actionMove_toolTypeStylus() local 121 mHandwritingInitiator.onTouchEvent(downEvent); in onTouchEvent_actionMove_toolTypeStylus() 135 final MotionEvent downEvent = in onTouchEvent_actionDown_toolTypeFinger() local 141 mHandwritingInitiator.onTouchEvent(downEvent); in onTouchEvent_actionDown_toolTypeFinger() 149 final MotionEvent downEvent = in onTouchEvent_actionUp_toolTypeFinger() local 155 mHandwritingInitiator.onTouchEvent(downEvent); in onTouchEvent_actionUp_toolTypeFinger() [all …]
|
/frameworks/base/core/tests/coretests/src/android/widget/ |
D | EditorTouchStateTest.java | 64 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 …]
|
D | EditorCursorDragTest.java | 296 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/packages/SystemUI/tests/src/com/android/systemui/accessibility/ |
D | MagnificationGestureDetectorTest.java | 82 final MotionEvent downEvent = mMotionEventHelper.obtainMotionEvent(downTime, downTime, in onActionDown_invokeDownCallback() local 85 mGestureDetector.onTouch(mSpyView, downEvent); in onActionDown_invokeDownCallback() 93 final MotionEvent downEvent = mMotionEventHelper.obtainMotionEvent(downTime, downTime, in performSingleTap_invokeCallbacksInOrder() local 98 mGestureDetector.onTouch(mSpyView, downEvent); in performSingleTap_invokeCallbacksInOrder() 111 final MotionEvent downEvent = mMotionEventHelper.obtainMotionEvent(downTime, downTime, in performSingleTapWithActionCancel_notInvokeOnSingleTapCallback() local 116 mGestureDetector.onTouch(mSpyView, downEvent); in performSingleTapWithActionCancel_notInvokeOnSingleTapCallback() 125 final MotionEvent downEvent = mMotionEventHelper.obtainMotionEvent(downTime, downTime, in performSingleTapWithTwoPointers_notInvokeSingleTapCallback() local 130 mGestureDetector.onTouch(mSpyView, downEvent); in performSingleTapWithTwoPointers_notInvokeSingleTapCallback() 139 final MotionEvent downEvent = mMotionEventHelper.obtainMotionEvent(downTime, downTime, in performLongPress_invokeCallbacksInOrder() local 144 mGestureDetector.onTouch(mSpyView, downEvent); in performLongPress_invokeCallbacksInOrder() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/gestures/ |
D | GesturesObserverTest.java | 84 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()
|
D | TouchExplorerTest.java | 207 send(downEvent(DEFAULT_X + 10, DEFAULT_Y + 10)); in testClick_afterCanceledDoubleTapAndHold_eventLocationIsCorrect() 214 fromTouchscreen(downEvent(DEFAULT_X + 100, DEFAULT_Y + 100)); in testClick_afterCanceledDoubleTapAndHold_eventLocationIsCorrect() 222 send(downEvent()); in testClick_afterCanceledDoubleTapAndHold_eventLocationIsCorrect() 276 send(downEvent()); in testFlickCrossViews_clearStateAndExpectedEvents() 393 send(downEvent()); in testCanceledGesture_shouldDoNothing() 492 send(downEvent()); in goFromStateClearTo() 609 private MotionEvent downEvent(float x, float y) { in downEvent() method in TouchExplorerTest 615 private MotionEvent downEvent() { in downEvent() method in TouchExplorerTest
|
/frameworks/base/services/accessibility/java/com/android/server/accessibility/magnification/ |
D | TwoFingersDownOrSwipe.java | 113 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/services/tests/servicestests/src/com/android/server/accessibility/ |
D | AccessibilityInputFilterTest.java | 273 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldDispatchToCorrespondingEventHandlers() 274 send(downEvent(SECOND_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldDispatchToCorrespondingEventHandlers() 290 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldClearEventsForDisplayEventHandlers() 291 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldClearEventsForDisplayEventHandlers() 296 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_MOUSE)); in testInputEvent_shouldClearEventsForDisplayEventHandlers() 314 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldNotClearEventsForOtherDisplayEventHandlers() 315 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldNotClearEventsForOtherDisplayEventHandlers() 316 send(downEvent(SECOND_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldNotClearEventsForOtherDisplayEventHandlers() 320 send(downEvent(SECOND_DISPLAY, InputDevice.SOURCE_MOUSE)); in testInputEvent_shouldNotClearEventsForOtherDisplayEventHandlers() 332 send(downEvent(DEFAULT_DISPLAY, InputDevice.SOURCE_TOUCHSCREEN)); in testInputEvent_shouldNotClearEventsForOtherDisplayAfterOnDisplayAdded() [all …]
|
/frameworks/base/tests/Input/src/com/android/server/input/ |
D | InputManagerServiceTests.kt | 280 val downEvent = createKeycodeAEvent(inputDevice, KeyEvent.ACTION_DOWN) in addUniqueIdAssociationByDescriptor_verifyAssociations() constant 287 service.injectInputEvent(downEvent, InputEventInjectionSync.NONE) in addUniqueIdAssociationByDescriptor_verifyAssociations() 290 mockOnKeyListener.onKey(mockSurfaceView1, /* keyCode= */ KeyEvent.KEYCODE_A, downEvent) in addUniqueIdAssociationByDescriptor_verifyAssociations() 294 verify(mockOnKeyListener).onKey(mockSurfaceView1, KeyEvent.KEYCODE_A, downEvent) in addUniqueIdAssociationByDescriptor_verifyAssociations() 295 verify(mockOnKeyListener, never()).onKey(mockSurfaceView2, KeyEvent.KEYCODE_A, downEvent) in addUniqueIdAssociationByDescriptor_verifyAssociations() 342 val downEvent = createKeycodeAEvent(inputDevice, KeyEvent.ACTION_DOWN) in addUniqueIdAssociationByPort_verifyAssociations() constant 349 service.injectInputEvent(downEvent, InputEventInjectionSync.NONE) in addUniqueIdAssociationByPort_verifyAssociations() 352 mockOnKeyListener.onKey(mockSurfaceView1, /* keyCode= */ KeyEvent.KEYCODE_A, downEvent) in addUniqueIdAssociationByPort_verifyAssociations() 356 verify(mockOnKeyListener).onKey(mockSurfaceView1, KeyEvent.KEYCODE_A, downEvent) in addUniqueIdAssociationByPort_verifyAssociations() 357 verify(mockOnKeyListener, never()).onKey(mockSurfaceView2, KeyEvent.KEYCODE_A, downEvent) in addUniqueIdAssociationByPort_verifyAssociations()
|
/frameworks/base/services/accessibility/java/com/android/server/accessibility/ |
D | AutoclickController.java | 431 MotionEvent downEvent = MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN, 1, in sendClick() local 436 MotionEvent pressEvent = MotionEvent.obtain(downEvent); in sendClick() 440 MotionEvent releaseEvent = MotionEvent.obtain(downEvent); in sendClick() 445 MotionEvent upEvent = MotionEvent.obtain(downEvent); in sendClick() 449 AutoclickController.super.onMotionEvent(downEvent, downEvent, mEventPolicyFlags); in sendClick() 450 downEvent.recycle(); in sendClick()
|
/frameworks/base/services/core/java/com/android/server/inputmethod/ |
D | HandwritingModeController.java | 304 final MotionEvent downEvent = mHandwritingBuffer.get(0); in startHandwritingSession() local 305 assert (downEvent.getActionMasked() == MotionEvent.ACTION_DOWN); in startHandwritingSession() 307 focusedWindowToken, mCurrentDisplayId, downEvent.getRawX(), downEvent.getRawY())) { in startHandwritingSession() 332 downEvent.getDisplayId(), downEvent.getDeviceId(), downEvent.getPointerId(0), in startHandwritingSession()
|
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/biometrics/ |
D | UdfpsControllerTest.java | 406 MotionEvent downEvent = obtainMotionEvent(ACTION_DOWN, 0, 0, 0, 0); in onActionDownTouch_whenCanDismissLockScreen_entersDevice() local 407 mTouchListenerCaptor.getValue().onTouch(mUdfpsView, downEvent); in onActionDownTouch_whenCanDismissLockScreen_entersDevice() 409 downEvent.recycle(); in onActionDownTouch_whenCanDismissLockScreen_entersDevice() 464 MotionEvent downEvent = MotionEvent.obtain(0, 0, ACTION_DOWN, 0, 0, 0); in onMultipleTouch_whenCanDismissLockScreen_entersDeviceOnce() local 465 mTouchListenerCaptor.getValue().onTouch(mUdfpsView, downEvent); in onMultipleTouch_whenCanDismissLockScreen_entersDeviceOnce() 467 downEvent.recycle(); in onMultipleTouch_whenCanDismissLockScreen_entersDeviceOnce() 765 MotionEvent downEvent = MotionEvent.obtain(0, 0, ACTION_DOWN, 0, 0, 0); in fingerDownParameterized() local 766 mTouchListenerCaptor.getValue().onTouch(mUdfpsView, downEvent); in fingerDownParameterized() 768 downEvent.recycle(); in fingerDownParameterized() 1019 MotionEvent downEvent = MotionEvent.obtain(0, 0, ACTION_DOWN, 0, 0, 0); in aodInterruptCancelTimeoutActionOnFingerUpParameterized() local [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/utils/ |
D | TouchEventGenerator.java | 38 public static MotionEvent downEvent(int displayId, float x, float y) { in downEvent() method in TouchEventGenerator 93 final MotionEvent downEvent = generateMultiplePointersEvent(displayId, in twoPointersDownEvents() local 95 downEvents.add(downEvent); in twoPointersDownEvents()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/ |
D | UdfpsShell.kt | 151 val downEvent: MotionEvent? = in simFingerDown() constant 159 udfpsOverlayController?.debugOnTouch(downEvent) in simFingerDown() 171 downEvent?.recycle() in simFingerDown()
|
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/ |
D | PipResizeGestureHandlerTest.java | 157 MotionEvent downEvent = in twoInput_triggersPinchResize_getBigger() local 159 assertTrue(mPipResizeGestureHandler.willStartResizeGesture(downEvent)); in twoInput_triggersPinchResize_getBigger() 198 MotionEvent downEvent = in twoInput_triggersPinchResize_getSmaller() local 200 assertTrue(mPipResizeGestureHandler.willStartResizeGesture(downEvent)); in twoInput_triggersPinchResize_getSmaller()
|
/frameworks/base/tests/Input/src/com/android/test/input/ |
D | MotionPredictorTest.kt | 117 val downEvent = getStylusMotionEvent(eventTime, ACTION_DOWN, /*x=*/0f, /*y=*/0f) in testPredictedCoordinatesAndTime() constant 119 predictor.record(downEvent) in testPredictedCoordinatesAndTime()
|
/frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/ui/automation/ |
D | Interaction.java | 115 MotionEvent downEvent = MotionEvent.obtain( in createInterpolatedEventList() local 117 result.add(downEvent); in createInterpolatedEventList()
|
/frameworks/base/cmds/uiautomator/library/core-src/com/android/uiautomator/core/ |
D | InteractionController.java | 190 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)) {
|