Home
last modified time | relevance | path

Searched refs:motionEvent (Results 1 – 25 of 44) sorted by relevance

12

/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/brightline/
DFalsingDataProvider.java63 void onMotionEvent(MotionEvent motionEvent) { in onMotionEvent() argument
64 if (motionEvent.getActionMasked() == MotionEvent.ACTION_DOWN) { in onMotionEvent()
65 mFirstActualMotionEvent = motionEvent; in onMotionEvent()
68 List<MotionEvent> motionEvents = unpackMotionEvent(motionEvent); in onMotionEvent()
77 if (motionEvent.getActionMasked() == MotionEvent.ACTION_DOWN) { in onMotionEvent()
211 private List<MotionEvent> unpackMotionEvent(MotionEvent motionEvent) { in unpackMotionEvent() argument
214 int pointerCount = motionEvent.getPointerCount(); in unpackMotionEvent()
217 motionEvent.getPointerProperties(i, pointerProperties); in unpackMotionEvent()
224 int historySize = motionEvent.getHistorySize(); in unpackMotionEvent()
229 motionEvent.getHistoricalPointerCoords(j, i, pointerCoords); in unpackMotionEvent()
[all …]
DProximityClassifier.java70 public void onTouchEvent(MotionEvent motionEvent) { in onTouchEvent() argument
71 int action = motionEvent.getActionMasked(); in onTouchEvent()
74 mGestureStartTimeNs = motionEvent.getEventTimeNano(); in onTouchEvent()
78 mPrevNearTimeNs = motionEvent.getEventTimeNano(); in onTouchEvent()
85 update(mNear, motionEvent.getEventTimeNano()); in onTouchEvent()
86 long duration = motionEvent.getEventTimeNano() - mGestureStartTimeNs; in onTouchEvent()
DPointerCountClassifier.java41 public void onTouchEvent(MotionEvent motionEvent) { in onTouchEvent() argument
43 if (motionEvent.getActionMasked() == MotionEvent.ACTION_DOWN) { in onTouchEvent()
44 mMaxPointerCount = motionEvent.getPointerCount(); in onTouchEvent()
46 mMaxPointerCount = Math.max(mMaxPointerCount, motionEvent.getPointerCount()); in onTouchEvent()
DDistanceClassifier.java120 for (MotionEvent motionEvent : motionEvents) { in calculateDistances()
121 velocityTracker.addMovement(motionEvent); in calculateDistances()
139 public void onTouchEvent(MotionEvent motionEvent) { in onTouchEvent() argument
DZigZagClassifier.java177 for (MotionEvent motionEvent : motionEvents) { in rotateMotionEvents()
178 float x = motionEvent.getX() - offsetX; in rotateMotionEvents()
179 float y = motionEvent.getY() - offsetY; in rotateMotionEvents()
DBrightLineFalsingManager.java155 public void onTouchEvent(MotionEvent motionEvent, int width, int height) { in onTouchEvent() argument
158 mDataProvider.onMotionEvent(motionEvent); in onTouchEvent()
159 mClassifiers.forEach((classifier) -> classifier.onTouchEvent(motionEvent)); in onTouchEvent()
/frameworks/native/libs/input/tests/
DInputPublisherAndConsumer_test.cpp189 MotionEvent* motionEvent = static_cast<MotionEvent*>(event); in PublishAndConsumeMotionEvent() local
191 EXPECT_EQ(deviceId, motionEvent->getDeviceId()); in PublishAndConsumeMotionEvent()
192 EXPECT_EQ(source, motionEvent->getSource()); in PublishAndConsumeMotionEvent()
193 EXPECT_EQ(displayId, motionEvent->getDisplayId()); in PublishAndConsumeMotionEvent()
194 EXPECT_EQ(action, motionEvent->getAction()); in PublishAndConsumeMotionEvent()
195 EXPECT_EQ(flags, motionEvent->getFlags()); in PublishAndConsumeMotionEvent()
196 EXPECT_EQ(edgeFlags, motionEvent->getEdgeFlags()); in PublishAndConsumeMotionEvent()
197 EXPECT_EQ(metaState, motionEvent->getMetaState()); in PublishAndConsumeMotionEvent()
198 EXPECT_EQ(buttonState, motionEvent->getButtonState()); in PublishAndConsumeMotionEvent()
199 EXPECT_EQ(classification, motionEvent->getClassification()); in PublishAndConsumeMotionEvent()
[all …]
/frameworks/base/core/tests/coretests/src/android/view/
DMotionEventTest.java55 MotionEvent motionEvent = MotionEvent.obtain(0, 0, ACTION_DOWN, in testObtainWithDisplayId() local
65 assertEquals(displayId, motionEvent.getDisplayId()); in testObtainWithDisplayId()
68 motionEvent.setDisplayId(displayId); in testObtainWithDisplayId()
69 assertEquals(displayId, motionEvent.getDisplayId()); in testObtainWithDisplayId()
70 motionEvent.recycle(); in testObtainWithDisplayId()
75 motionEvent = MotionEvent.obtain(0, 0, ACTION_DOWN, in testObtainWithDisplayId()
78 assertNull(motionEvent); in testObtainWithDisplayId()
/frameworks/base/services/core/java/com/android/server/wm/
DTaskTapPointerEventListener.java52 public void onPointerEvent(MotionEvent motionEvent) { in onPointerEvent() argument
53 switch (motionEvent.getActionMasked()) { in onPointerEvent()
55 final int x = (int) motionEvent.getX(); in onPointerEvent()
56 final int y = (int) motionEvent.getY(); in onPointerEvent()
68 final int x = (int) motionEvent.getX(); in onPointerEvent()
69 final int y = (int) motionEvent.getY(); in onPointerEvent()
104 final int x = (int) motionEvent.getX(); in onPointerEvent()
105 final int y = (int) motionEvent.getY(); in onPointerEvent()
DDragInputEventReceiver.java65 final MotionEvent motionEvent = (MotionEvent) event; in onInputEvent() local
66 final float newX = motionEvent.getRawX(); in onInputEvent()
67 final float newY = motionEvent.getRawY(); in onInputEvent()
69 (motionEvent.getButtonState() & BUTTON_STYLUS_PRIMARY) != 0; in onInputEvent()
78 switch (motionEvent.getAction()) { in onInputEvent()
DPointerEventDispatcher.java45 final MotionEvent motionEvent = (MotionEvent) event; in onInputEvent() local
55 listeners[i].onPointerEvent(motionEvent); in onInputEvent()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/
DPointerCountClassifierTest.java71 MotionEvent motionEvent = MotionEvent.obtain( in testFail_multiPointer() local
75 mClassifier.onTouchEvent(motionEvent); in testFail_multiPointer()
76 motionEvent.recycle(); in testFail_multiPointer()
87 MotionEvent motionEvent = MotionEvent.obtain( in testPass_multiPointerDragDown() local
91 mClassifier.onTouchEvent(motionEvent); in testPass_multiPointerDragDown()
92 motionEvent.recycle(); in testPass_multiPointerDragDown()
DClassifierTest.java68 for (MotionEvent motionEvent : mMotionEvents) { in resetDataProvider()
69 motionEvent.recycle(); in resetDataProvider()
113 MotionEvent motionEvent = MotionEvent.obtain(1, eventTime, actionType, x, y, in appendMotionEvent() local
115 mMotionEvents.add(motionEvent); in appendMotionEvent()
117 mDataProvider.onMotionEvent(motionEvent); in appendMotionEvent()
119 return motionEvent; in appendMotionEvent()
DProximityClassifierTest.java125 MotionEvent motionEvent = MotionEvent.obtain(1, 1, MotionEvent.ACTION_DOWN, 0, 0, 0); in touchDown() local
126 mClassifier.onTouchEvent(motionEvent); in touchDown()
127 motionEvent.recycle(); in touchDown()
131 MotionEvent motionEvent = MotionEvent.obtain(1, 1 + duration, MotionEvent.ACTION_UP, 0, in touchUp() local
134 mClassifier.onTouchEvent(motionEvent); in touchUp()
136 motionEvent.recycle(); in touchUp()
/frameworks/native/services/inputflinger/tests/
DInputClassifierConverter_test.cpp68 common::V1_0::MotionEvent motionEvent = notifyMotionArgsToHalMotionEvent(motionArgs); in TEST() local
70 ASSERT_EQ(getMotionEventAxis(motionEvent.pointerCoords[0], common::V1_0::Axis::X), in TEST()
72 ASSERT_EQ(getMotionEventAxis(motionEvent.pointerCoords[0], common::V1_0::Axis::Y), in TEST()
74 ASSERT_EQ(getMotionEventAxis(motionEvent.pointerCoords[0], common::V1_0::Axis::SIZE), in TEST()
77 BitSet64::count(motionEvent.pointerCoords[0].bits)); in TEST()
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/view/
DRichTextViewTest.java126 MotionEvent motionEvent = MotionEvent.obtain(123, 22, MotionEvent.ACTION_DOWN, 0, 0, 0); in onTouchEvent_clickOnLinks_shouldReturnTrue() local
127 doReturn(motionEvent).when(mockMovementMethod).getLastTouchEvent(); in onTouchEvent_clickOnLinks_shouldReturnTrue()
129 assertThat(textView.onTouchEvent(motionEvent)).isTrue(); in onTouchEvent_clickOnLinks_shouldReturnTrue()
144 MotionEvent motionEvent = MotionEvent.obtain(123, 22, MotionEvent.ACTION_DOWN, 0, 0, 0); in onTouchEvent_clickOutsideLinks_shouldReturnFalse() local
145 doReturn(motionEvent).when(mockMovementMethod).getLastTouchEvent(); in onTouchEvent_clickOutsideLinks_shouldReturnFalse()
147 assertThat(textView.onTouchEvent(motionEvent)).isFalse(); in onTouchEvent_clickOutsideLinks_shouldReturnFalse()
/frameworks/base/core/java/android/view/
DInputEventConsistencyVerifier.java180 final MotionEvent motionEvent = (MotionEvent)event; in onInputEvent() local
181 if (motionEvent.isTouchEvent()) { in onInputEvent()
182 onTouchEvent(motionEvent, nestingLevel); in onInputEvent()
183 } else if ((motionEvent.getSource() & InputDevice.SOURCE_CLASS_TRACKBALL) != 0) { in onInputEvent()
184 onTrackballEvent(motionEvent, nestingLevel); in onInputEvent()
186 onGenericMotionEvent(motionEvent, nestingLevel); in onInputEvent()
606 final MotionEvent motionEvent = (MotionEvent)event; in onUnhandledEvent() local
607 if (motionEvent.isTouchEvent()) { in onUnhandledEvent()
609 } else if ((motionEvent.getSource() & InputDevice.SOURCE_CLASS_TRACKBALL) != 0) { in onUnhandledEvent()
/frameworks/base/core/java/android/inputmethodservice/
DIInputMethodSessionWrapper.java237 MotionEvent motionEvent = (MotionEvent)event; in onInputEvent() local
238 if (motionEvent.isFromSource(InputDevice.SOURCE_CLASS_TRACKBALL)) { in onInputEvent()
239 mInputMethodSession.dispatchTrackballEvent(seq, motionEvent, this); in onInputEvent()
241 mInputMethodSession.dispatchGenericMotionEvent(seq, motionEvent, this); in onInputEvent()
DMultiClientInputMethodClientCallbackAdaptor.java171 final MotionEvent motionEvent = (MotionEvent) event; in onInputEvent() local
172 if (motionEvent.isFromSource(InputDevice.SOURCE_CLASS_TRACKBALL)) { in onInputEvent()
173 handled = mClientCallback.onTrackballEvent(motionEvent); in onInputEvent()
175 handled = mClientCallback.onGenericMotionEvent(motionEvent); in onInputEvent()
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/util/
DMockWindow.java187 public boolean superDispatchTouchEvent(MotionEvent motionEvent) { in superDispatchTouchEvent() argument
192 public boolean superDispatchTrackballEvent(MotionEvent motionEvent) { in superDispatchTrackballEvent() argument
197 public boolean superDispatchGenericMotionEvent(MotionEvent motionEvent) { in superDispatchGenericMotionEvent() argument
/frameworks/native/services/inputflinger/dispatcher/
DInputDispatcher.cpp2898 const MotionEvent* motionEvent = static_cast<const MotionEvent*>(event); in injectInputEvent() local
2899 int32_t action = motionEvent->getAction(); in injectInputEvent()
2900 size_t pointerCount = motionEvent->getPointerCount(); in injectInputEvent()
2901 const PointerProperties* pointerProperties = motionEvent->getPointerProperties(); in injectInputEvent()
2902 int32_t actionButton = motionEvent->getActionButton(); in injectInputEvent()
2903 int32_t displayId = motionEvent->getDisplayId(); in injectInputEvent()
2909 nsecs_t eventTime = motionEvent->getEventTime(); in injectInputEvent()
2919 const nsecs_t* sampleEventTimes = motionEvent->getSampleEventTimes(); in injectInputEvent()
2920 const PointerCoords* samplePointerCoords = motionEvent->getSamplePointerCoords(); in injectInputEvent()
2923 motionEvent->getDeviceId(), motionEvent->getSource(), in injectInputEvent()
[all …]
/frameworks/base/core/jni/
Dandroid_view_InputEventReceiver.cpp298 MotionEvent* motionEvent = static_cast<MotionEvent*>(inputEvent); in consumeEvents() local
299 if ((motionEvent->getAction() & AMOTION_EVENT_ACTION_MOVE) && outConsumedBatch) { in consumeEvents()
302 inputEventObj = android_view_MotionEvent_obtainAsCopy(env, motionEvent); in consumeEvents()
/frameworks/base/core/java/android/widget/
DTimePickerClockDelegate.java1081 public boolean onTouch(View view, MotionEvent motionEvent) {
1082 final int actionMasked = motionEvent.getActionMasked();
1086 (int) motionEvent.getX(), (int) motionEvent.getY());
1099 motionEvent.offsetLocation(offsetX, offsetY);
1100 final boolean handled = child.dispatchTouchEvent(motionEvent);
1101 motionEvent.offsetLocation(-offsetX, -offsetY);
/frameworks/base/packages/SystemUI/src/com/android/systemui/analytics/
DSensorLoggerSession.java70 public void addMotionEvent(MotionEvent motionEvent) { in addMotionEvent() argument
71 TouchEvent event = motionEventToProto(motionEvent); in addMotionEvent()
/frameworks/base/core/java/com/android/internal/widget/helper/
DItemTouchHelper.java913 private ViewHolder findSwipedView(MotionEvent motionEvent) { in findSwipedView() argument
918 final int pointerIndex = motionEvent.findPointerIndex(mActivePointerId); in findSwipedView()
919 final float dx = motionEvent.getX(pointerIndex) - mInitialTouchX; in findSwipedView()
920 final float dy = motionEvent.getY(pointerIndex) - mInitialTouchY; in findSwipedView()
932 View child = findChildView(motionEvent); in findSwipedView()
942 boolean checkSelectForSwipe(int action, MotionEvent motionEvent, int pointerIndex) { in checkSelectForSwipe() argument
950 final ViewHolder vh = findSwipedView(motionEvent); in checkSelectForSwipe()
965 final float x = motionEvent.getX(pointerIndex); in checkSelectForSwipe()
966 final float y = motionEvent.getY(pointerIndex); in checkSelectForSwipe()
995 mActivePointerId = motionEvent.getPointerId(0); in checkSelectForSwipe()

12