/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/ |
D | TouchExplorerTest.java | 29 import android.view.MotionEvent; 68 private MotionEvent mLastEvent; 83 List<MotionEvent> mEvents = new ArrayList<>(); 86 public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() 116 MotionEvent.ACTION_DOWN, in testTwoFingersMove_shouldDelegatingAndInjectActionDownPointerDown() 117 MotionEvent.ACTION_POINTER_DOWN); in testTwoFingersMove_shouldDelegatingAndInjectActionDownPointerDown() 126 assertCapturedEvents(MotionEvent.ACTION_DOWN); in testTwoFingersDrag_shouldDraggingAndActionDown() 137 /* goto dragging state */ MotionEvent.ACTION_DOWN, in testTwoFingersNotDrag_shouldDelegatingAndActionUpDownPointerDown() 138 /* leave dragging state */ MotionEvent.ACTION_UP, in testTwoFingersNotDrag_shouldDelegatingAndActionUpDownPointerDown() 139 MotionEvent.ACTION_DOWN, in testTwoFingersNotDrag_shouldDelegatingAndActionUpDownPointerDown() [all …]
|
D | MagnificationGestureHandlerTest.java | 19 import static android.view.MotionEvent.ACTION_DOWN; 20 import static android.view.MotionEvent.ACTION_MOVE; 21 import static android.view.MotionEvent.ACTION_POINTER_DOWN; 22 import static android.view.MotionEvent.ACTION_POINTER_UP; 45 import android.view.MotionEvent; 577 private void send(MotionEvent event) { 587 private static MotionEvent fromTouchscreen(MotionEvent ev) { 592 private MotionEvent moveEvent(float x, float y) { 594 MotionEvent.obtain(mLastDownTime, mClock.now(), ACTION_MOVE, x, y, 0)); 597 private MotionEvent downEvent() { [all …]
|
/frameworks/base/native/android/ |
D | input.cpp | 37 using android::MotionEvent; 86 return static_cast<const MotionEvent*>(motion_event)->getAction(); in AMotionEvent_getAction() 90 return static_cast<const MotionEvent*>(motion_event)->getFlags(); in AMotionEvent_getFlags() 94 return static_cast<const MotionEvent*>(motion_event)->getMetaState(); in AMotionEvent_getMetaState() 98 return static_cast<const MotionEvent*>(motion_event)->getButtonState(); in AMotionEvent_getButtonState() 102 return reinterpret_cast<const MotionEvent*>(motion_event)->getEdgeFlags(); in AMotionEvent_getEdgeFlags() 106 return static_cast<const MotionEvent*>(motion_event)->getDownTime(); in AMotionEvent_getDownTime() 110 return static_cast<const MotionEvent*>(motion_event)->getEventTime(); in AMotionEvent_getEventTime() 114 return static_cast<const MotionEvent*>(motion_event)->getXOffset(); in AMotionEvent_getXOffset() 118 return static_cast<const MotionEvent*>(motion_event)->getYOffset(); in AMotionEvent_getYOffset() [all …]
|
/frameworks/base/core/jni/ |
D | android_view_MotionEvent.cpp | 68 MotionEvent* android_view_MotionEvent_getNativePtr(JNIEnv* env, jobject eventObj) { in android_view_MotionEvent_getNativePtr() 72 return reinterpret_cast<MotionEvent*>( in android_view_MotionEvent_getNativePtr() 77 MotionEvent* event) { in android_view_MotionEvent_setNativePtr() 82 jobject android_view_MotionEvent_obtainAsCopy(JNIEnv* env, const MotionEvent* event) { in android_view_MotionEvent_obtainAsCopy() 92 MotionEvent* destEvent = android_view_MotionEvent_getNativePtr(env, eventObj); in android_view_MotionEvent_obtainAsCopy() 94 destEvent = new MotionEvent(); in android_view_MotionEvent_obtainAsCopy() 348 MotionEvent* event; in android_view_MotionEvent_nativeInitialize() 350 event = reinterpret_cast<MotionEvent*>(nativePtr); in android_view_MotionEvent_nativeInitialize() 352 event = new MotionEvent(); in android_view_MotionEvent_nativeInitialize() 391 MotionEvent* event = reinterpret_cast<MotionEvent*>(nativePtr); in android_view_MotionEvent_nativeDispose() [all …]
|
/frameworks/base/services/accessibility/java/com/android/server/accessibility/ |
D | TouchExplorer.java | 24 import android.view.MotionEvent; 25 import android.view.MotionEvent.PointerCoords; 26 import android.view.MotionEvent.PointerProperties; 229 MotionEvent event = mReceivedPointerTracker.getLastReceivedEvent(); in clear() 235 private void clear(MotionEvent event, int policyFlags) { in clear() 276 public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() 295 if (event.getActionMasked() == MotionEvent.ACTION_CANCEL) { in onMotionEvent() 359 public void onDoubleTapAndHold(MotionEvent event, int policyFlags) { in onDoubleTapAndHold() 391 public boolean onDoubleTap(MotionEvent event, int policyFlags) { in onDoubleTap() 435 MotionEvent click_event = MotionEvent.obtain(event.getDownTime(), in onDoubleTap() [all …]
|
D | MagnificationGestureHandler.java | 20 import static android.view.MotionEvent.ACTION_CANCEL; 21 import static android.view.MotionEvent.ACTION_DOWN; 22 import static android.view.MotionEvent.ACTION_MOVE; 23 import static android.view.MotionEvent.ACTION_POINTER_DOWN; 24 import static android.view.MotionEvent.ACTION_POINTER_UP; 25 import static android.view.MotionEvent.ACTION_UP; 48 import android.view.MotionEvent; 49 import android.view.MotionEvent.PointerCoords; 50 import android.view.MotionEvent.PointerProperties; 153 private final Queue<MotionEvent> mDebugInputEventHistory; [all …]
|
D | AccessibilityGestureDetector.java | 30 import android.view.MotionEvent; 105 void onDoubleTapAndHold(MotionEvent event, int policyFlags); in onDoubleTapAndHold() 116 boolean onDoubleTap(MotionEvent event, int policyFlags); in onDoubleTap() 143 public boolean onGestureCancelled(MotionEvent event, int policyFlags); in onGestureCancelled() 270 public boolean onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() 279 case MotionEvent.ACTION_DOWN: in onMotionEvent() 294 case MotionEvent.ACTION_MOVE: in onMotionEvent() 343 case MotionEvent.ACTION_UP: in onMotionEvent() 357 case MotionEvent.ACTION_POINTER_DOWN: in onMotionEvent() 374 case MotionEvent.ACTION_POINTER_UP: in onMotionEvent() [all …]
|
D | MotionEventInjector.java | 33 import android.view.MotionEvent; 65 private static MotionEvent.PointerCoords[] sPointerCoords; 66 private static MotionEvent.PointerProperties[] sPointerProps; 113 public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() 119 && event.getActionMasked() == MotionEvent.ACTION_HOVER_MOVE) in onMotionEvent() 157 MotionEvent motionEvent = (MotionEvent) message.obj; in handleMessage() 202 List<MotionEvent> events = getMotionEventsFromGestureSteps(gestureSteps, in injectEventsMainThread() 211 MotionEvent event = events.get(i); in injectEventsMainThread() 289 private void sendMotionEventToNext(MotionEvent event, MotionEvent rawEvent, in sendMotionEventToNext() 293 if (event.getActionMasked() == MotionEvent.ACTION_DOWN) { in sendMotionEventToNext() [all …]
|
D | AutoclickController.java | 29 import android.view.MotionEvent; 30 import android.view.MotionEvent.PointerCoords; 31 import android.view.MotionEvent.PointerProperties; 72 public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() 124 private void handleMouseMotion(MotionEvent event, int policyFlags) { in handleMouseMotion() 126 case MotionEvent.ACTION_HOVER_MOVE: { in handleMouseMotion() 134 case MotionEvent.ACTION_HOVER_ENTER: in handleMouseMotion() 135 case MotionEvent.ACTION_HOVER_EXIT: in handleMouseMotion() 236 private MotionEvent mLastMotionEvent; 289 public void update(MotionEvent event, int policyFlags) { in update() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/brightline/ |
D | TimeLimitedMotionEventBuffer.java | 19 import android.view.MotionEvent; 34 public class TimeLimitedMotionEventBuffer implements List<MotionEvent> { 36 private final LinkedList<MotionEvent> mMotionEvents; 49 Iterator<MotionEvent> iter = listIterator(); in ejectOldEvents() 52 MotionEvent ev = iter.next(); in ejectOldEvents() 61 public void add(int index, MotionEvent element) { in add() 66 public MotionEvent remove(int index) { in remove() 96 public Iterator<MotionEvent> iterator() { in iterator() 111 public boolean add(MotionEvent element) { in add() 128 public boolean addAll(Collection<? extends MotionEvent> collection) { in addAll() [all …]
|
D | FalsingDataProvider.java | 20 import android.view.MotionEvent; 21 import android.view.MotionEvent.PointerCoords; 22 import android.view.MotionEvent.PointerProperties; 49 private MotionEvent mFirstActualMotionEvent; 50 private MotionEvent mFirstRecentMotionEvent; 51 private MotionEvent mLastMotionEvent; 63 void onMotionEvent(MotionEvent motionEvent) { in onMotionEvent() 64 if (motionEvent.getActionMasked() == MotionEvent.ACTION_DOWN) { in onMotionEvent() 68 List<MotionEvent> motionEvents = unpackMotionEvent(motionEvent); in onMotionEvent() 71 for (MotionEvent m : motionEvents) { in onMotionEvent() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/ |
D | ClassifierTest.java | 22 import android.view.MotionEvent; 35 private List<MotionEvent> mMotionEvents = new ArrayList<>(); 68 for (MotionEvent motionEvent : mMotionEvents) { in resetDataProvider() 77 MotionEvent appendDownEvent(float x, float y) { in appendDownEvent() 78 return appendMotionEvent(MotionEvent.ACTION_DOWN, x, y); in appendDownEvent() 81 MotionEvent appendDownEvent(float x, float y, long eventTime) { in appendDownEvent() 82 return appendMotionEvent(MotionEvent.ACTION_DOWN, x, y, eventTime); in appendDownEvent() 85 MotionEvent appendMoveEvent(float x, float y) { in appendMoveEvent() 86 return appendMotionEvent(MotionEvent.ACTION_MOVE, x, y); in appendMoveEvent() 89 MotionEvent appendMoveEvent(float x, float y, long eventTime) { in appendMoveEvent() [all …]
|
D | PointerCountClassifierTest.java | 26 import android.view.MotionEvent; 66 MotionEvent.PointerProperties[] pointerProperties = in testFail_multiPointer() 67 MotionEvent.PointerProperties.createArray(2); in testFail_multiPointer() 70 MotionEvent.PointerCoords[] pointerCoords = MotionEvent.PointerCoords.createArray(2); in testFail_multiPointer() 71 MotionEvent motionEvent = MotionEvent.obtain( in testFail_multiPointer() 72 1, 1, MotionEvent.ACTION_DOWN, 2, pointerProperties, pointerCoords, 0, 0, 0, 0, 0, in testFail_multiPointer() 82 MotionEvent.PointerProperties[] pointerProperties = in testPass_multiPointerDragDown() 83 MotionEvent.PointerProperties.createArray(2); in testPass_multiPointerDragDown() 86 MotionEvent.PointerCoords[] pointerCoords = MotionEvent.PointerCoords.createArray(2); in testPass_multiPointerDragDown() 87 MotionEvent motionEvent = MotionEvent.obtain( in testPass_multiPointerDragDown() [all …]
|
D | FalsingDataProviderTest.java | 26 import android.view.MotionEvent; 66 List<MotionEvent> motionEventList = mDataProvider.getRecentMotionEvents(); in test_trackMotionEvents() 69 assertThat(motionEventList.get(0).getActionMasked(), is(MotionEvent.ACTION_DOWN)); in test_trackMotionEvents() 70 assertThat(motionEventList.get(1).getActionMasked(), is(MotionEvent.ACTION_MOVE)); in test_trackMotionEvents() 71 assertThat(motionEventList.get(2).getActionMasked(), is(MotionEvent.ACTION_UP)); in test_trackMotionEvents() 87 List<MotionEvent> motionEventList = mDataProvider.getRecentMotionEvents(); in test_trackRecentMotionEvents() 90 assertThat(motionEventList.get(0).getActionMasked(), is(MotionEvent.ACTION_DOWN)); in test_trackRecentMotionEvents() 91 assertThat(motionEventList.get(1).getActionMasked(), is(MotionEvent.ACTION_MOVE)); in test_trackRecentMotionEvents() 103 assertThat(motionEventList.get(0).getActionMasked(), is(MotionEvent.ACTION_MOVE)); in test_trackRecentMotionEvents() 104 assertThat(motionEventList.get(1).getActionMasked(), is(MotionEvent.ACTION_UP)); in test_trackRecentMotionEvents() [all …]
|
/frameworks/base/core/tests/coretests/src/android/view/ |
D | PinchZoomAction.java | 60 final MotionEvent.PointerProperties pp1 = new MotionEvent.PointerProperties(); in sendPinchZoomAction() 62 pp1.toolType = MotionEvent.TOOL_TYPE_FINGER; in sendPinchZoomAction() 63 final MotionEvent.PointerProperties pp2 = new MotionEvent.PointerProperties(); in sendPinchZoomAction() 65 pp2.toolType = MotionEvent.TOOL_TYPE_FINGER; in sendPinchZoomAction() 66 MotionEvent.PointerProperties[] pointerProperties = in sendPinchZoomAction() 67 new MotionEvent.PointerProperties[]{pp1, pp2}; in sendPinchZoomAction() 70 final MotionEvent.PointerCoords pc1 = new MotionEvent.PointerCoords(); in sendPinchZoomAction() 75 final MotionEvent.PointerCoords pc2 = new MotionEvent.PointerCoords(); in sendPinchZoomAction() 83 final MotionEvent.PointerCoords[] pointerCoords = new MotionEvent.PointerCoords[]{pc1, pc2}; in sendPinchZoomAction() 85 final MotionEvent firstFingerEvent = MotionEvent.obtain(startTime, in sendPinchZoomAction() [all …]
|
/frameworks/base/core/java/android/view/ |
D | GestureDetector.java | 67 boolean onDown(MotionEvent e); in onDown() 77 void onShowPress(MotionEvent e); in onShowPress() 86 boolean onSingleTapUp(MotionEvent e); in onSingleTapUp() 103 boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY); in onScroll() 111 void onLongPress(MotionEvent e); in onLongPress() 126 boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY); in onFling() 145 boolean onSingleTapConfirmed(MotionEvent e); in onSingleTapConfirmed() 153 boolean onDoubleTap(MotionEvent e); in onDoubleTap() 162 boolean onDoubleTapEvent(MotionEvent e); in onDoubleTapEvent() 177 boolean onContextClick(MotionEvent e); in onContextClick() [all …]
|
D | InputEventConsistencyVerifier.java | 180 final MotionEvent motionEvent = (MotionEvent)event; in onInputEvent() 262 public void onTrackballEvent(MotionEvent event, int nestingLevel) { in onTrackballEvent() 274 case MotionEvent.ACTION_DOWN: in onTrackballEvent() 284 case MotionEvent.ACTION_UP: in onTrackballEvent() 294 case MotionEvent.ACTION_MOVE: in onTrackballEvent() 298 problem("Invalid action " + MotionEvent.actionToString(action) in onTrackballEvent() 326 public void onTouchEvent(MotionEvent event, int nestingLevel) { in onTouchEvent() 332 final boolean newStream = action == MotionEvent.ACTION_DOWN in onTouchEvent() 333 || action == MotionEvent.ACTION_CANCEL || action == MotionEvent.ACTION_OUTSIDE; in onTouchEvent() 364 case MotionEvent.ACTION_DOWN: in onTouchEvent() [all …]
|
D | TouchDelegate.java | 112 public boolean onTouchEvent(@NonNull MotionEvent event) { in onTouchEvent() 120 case MotionEvent.ACTION_DOWN: in onTouchEvent() 124 case MotionEvent.ACTION_POINTER_DOWN: in onTouchEvent() 125 case MotionEvent.ACTION_POINTER_UP: in onTouchEvent() 126 case MotionEvent.ACTION_UP: in onTouchEvent() 127 case MotionEvent.ACTION_MOVE: in onTouchEvent() 136 case MotionEvent.ACTION_CANCEL: in onTouchEvent() 170 public boolean onTouchExplorationHoverEvent(@NonNull MotionEvent event) { in onTouchExplorationHoverEvent() 182 case MotionEvent.ACTION_HOVER_ENTER: in onTouchExplorationHoverEvent() 185 case MotionEvent.ACTION_HOVER_MOVE: in onTouchExplorationHoverEvent() [all …]
|
/frameworks/base/core/java/android/widget/ |
D | ForwardingListener.java | 20 import android.view.MotionEvent; 84 public boolean onTouch(View v, MotionEvent event) { in onTouch() 95 final MotionEvent e = MotionEvent.obtain(now, now, MotionEvent.ACTION_CANCEL, in onTouch() 113 mActivePointerId = MotionEvent.INVALID_POINTER_ID; in onViewDetachedFromWindow() 160 private boolean onTouchObserved(MotionEvent srcEvent) { in onTouchObserved() 168 case MotionEvent.ACTION_DOWN: in onTouchObserved() 181 case MotionEvent.ACTION_MOVE: in onTouchObserved() 197 case MotionEvent.ACTION_CANCEL: in onTouchObserved() 198 case MotionEvent.ACTION_UP: in onTouchObserved() 235 final MotionEvent e = MotionEvent.obtain(now, now, MotionEvent.ACTION_CANCEL, 0, 0, 0); in onLongPress() [all …]
|
/frameworks/base/packages/EasterEgg/src/com/android/egg/paint/ |
D | SpotFilter.kt | 21 import android.view.MotionEvent 24 val spots = LinkedList<MotionEvent.PointerCoords>() // newest at front 25 val tmpSpot = MotionEvent.PointerCoords() 26 var lastTool = MotionEvent.TOOL_TYPE_UNKNOWN 32 fun plot(s: MotionEvent.PointerCoords) in plot() 40 fun filterInto(out: MotionEvent.PointerCoords, tool: Int): MotionEvent.PointerCoords { in filterInto() 65 if (PRECISE_STYLUS_INPUT && tool == MotionEvent.TOOL_TYPE_STYLUS) { in filterInto() 78 protected fun addInternal(c: MotionEvent.PointerCoords, tool: Int) { in addInternal() 83 MotionEvent.PointerCoords() in addInternal() 93 fun add(cv: List<MotionEvent.PointerCoords>, tool: Int) { in add() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/ |
D | ClassifierData.java | 20 import android.view.MotionEvent; 41 public boolean update(MotionEvent event) { in update() 45 if (event.getActionMasked() == MotionEvent.ACTION_MOVE in update() 54 if (action == MotionEvent.ACTION_DOWN) { in update() 66 if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL in update() 67 || (action == MotionEvent.ACTION_POINTER_UP && i == event.getActionIndex())) { in update() 75 public void cleanUp(MotionEvent event) { in cleanUp() 80 if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL in cleanUp() 81 || (action == MotionEvent.ACTION_POINTER_UP && i == event.getActionIndex())) { in cleanUp()
|
/frameworks/base/core/java/com/android/internal/widget/ |
D | DecorCaptionView.java | 26 import android.view.MotionEvent; 152 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() 155 if (ev.getAction() == MotionEvent.ACTION_DOWN) { in onInterceptTouchEvent() 170 public boolean onTouchEvent(MotionEvent event) { in onTouchEvent() 174 if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL) { in onTouchEvent() 183 public boolean onTouch(View v, MotionEvent e) { in onTouch() 189 final boolean fromMouse = e.getToolType(e.getActionIndex()) == MotionEvent.TOOL_TYPE_MOUSE; in onTouch() 190 final boolean primaryButton = (e.getButtonState() & MotionEvent.BUTTON_PRIMARY) != 0; in onTouch() 193 case MotionEvent.ACTION_DOWN: in onTouch() 207 case MotionEvent.ACTION_MOVE: in onTouch() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ |
D | NearestTouchFrameTest.java | 28 import android.view.MotionEvent; 66 MotionEvent ev = MotionEvent.obtain(0, 0, 0, in testNoActionOnLargeDevices() 83 MotionEvent ev = MotionEvent.obtain(0, 0, 0, in testInvisibleViews() 103 MotionEvent ev = MotionEvent.obtain(0, 0, 0, in testNearestView_DetachedViewsExcluded() 119 MotionEvent ev = MotionEvent.obtain(0, 0, 0, in testHorizontalSelection_Left() 135 MotionEvent ev = MotionEvent.obtain(0, 0, 0, in testHorizontalSelection_Right() 151 MotionEvent ev = MotionEvent.obtain(0, 0, 0, in testVerticalSelection_Top() 167 MotionEvent ev = MotionEvent.obtain(0, 0, 0, in testVerticalSelection_Bottom() 181 MotionEvent ev = MotionEvent.obtain(0, 0, 0, 5 /* x */, 18 /* y */, 0); in testViewNotAttachedNoCrash()
|
/frameworks/base/core/tests/coretests/src/android/widget/espresso/ |
D | MouseUiController.java | 25 import android.view.MotionEvent; 40 @IntDef({MotionEvent.BUTTON_PRIMARY, MotionEvent.BUTTON_SECONDARY, MotionEvent.BUTTON_TERTIARY}) 48 this(uiController, MotionEvent.BUTTON_PRIMARY); in MouseUiController() 68 public boolean injectMotionEvent(MotionEvent event) throws InjectEventSecurityException { in injectMotionEvent() 71 if (event.getActionMasked() != MotionEvent.ACTION_UP) { in injectMotionEvent() 83 public boolean injectMotionEventSequence(Iterable<MotionEvent> events) in injectMotionEventSequence() 89 Iterator<MotionEvent> mei = events.iterator(); in injectMotionEventSequence() 92 MotionEvent me = mei.next(); in injectMotionEventSequence()
|
/frameworks/base/tests/JankBench/app/src/main/java/com/android/benchmark/ui/automation/ |
D | Interaction.java | 21 import android.view.MotionEvent; 35 private List<MotionEvent> mEvents; 84 public List<MotionEvent> getEvents() { in getEvents() 107 private static List<MotionEvent> createInterpolatedEventList( in createInterpolatedEventList() 110 List<MotionEvent> result = new ArrayList<>(); in createInterpolatedEventList() 115 MotionEvent downEvent = MotionEvent.obtain( in createInterpolatedEventList() 116 startTime, startTime, MotionEvent.ACTION_DOWN, startX, startY, 0); in createInterpolatedEventList() 130 MotionEvent moveEvent = MotionEvent.obtain(startTime, startTime + deltaT, in createInterpolatedEventList() 131 MotionEvent.ACTION_MOVE, startX + deltaX, startY + deltaY, 0); in createInterpolatedEventList() 141 MotionEvent lastEvent = MotionEvent.obtain(startTime, startTime + duration, in createInterpolatedEventList() [all …]
|