Home
last modified time | relevance | path

Searched refs:pointerIndex (Results 1 – 25 of 55) sorted by relevance

123

/frameworks/base/services/accessibility/java/com/android/server/accessibility/gestures/
DMultiFingerSwipe.java130 int pointerIndex = rawEvent.getPointerCount() - 1; in onDown() local
136 if (mPointerIds[pointerIndex] != INVALID_POINTER_ID) { in onDown()
141 mPointerIds[pointerIndex] = pointerId; in onDown()
142 if (Float.isNaN(mBase[pointerIndex].x) && Float.isNaN(mBase[pointerIndex].y)) { in onDown()
149 mBase[pointerIndex].x = x; in onDown()
150 mBase[pointerIndex].y = y; in onDown()
151 mPreviousGesturePoint[pointerIndex].x = x; in onDown()
152 mPreviousGesturePoint[pointerIndex].y = y; in onDown()
181 int pointerIndex = mCurrentFingerCount - 1; in onPointerDown() local
182 if (mPointerIds[pointerIndex] != INVALID_POINTER_ID) { in onPointerDown()
[all …]
DEventDispatcher.java255 private int computeInjectionAction(int actionMasked, int pointerIndex) { in computeInjectionAction() argument
263 return (pointerIndex << MotionEvent.ACTION_POINTER_INDEX_SHIFT) in computeInjectionAction()
271 return (pointerIndex << MotionEvent.ACTION_POINTER_INDEX_SHIFT) in computeInjectionAction()
410 final int pointerIndex = event.getActionIndex(); in longPressWithTouchEvents() local
411 final int pointerId = event.getPointerId(pointerIndex); in longPressWithTouchEvents()
413 mLongPressingPointerDeltaX = (int) event.getX(pointerIndex) - clickLocation.x; in longPressWithTouchEvents()
414 mLongPressingPointerDeltaY = (int) event.getY(pointerIndex) - clickLocation.y; in longPressWithTouchEvents()
428 final int pointerIndex = event.getActionIndex(); in clickWithTouchEvents() local
429 final int pointerId = event.getPointerId(pointerIndex); in clickWithTouchEvents()
441 event.getPointerProperties(pointerIndex, properties[0]); in clickWithTouchEvents()
DSecondFingerMultiTap.java147 int pointerIndex = rawEvent.findPointerIndex(mSecondFingerPointerId); in isSecondFingerInsideSlop() local
148 if (pointerIndex == -1) { in isSecondFingerInsideSlop()
151 final float deltaX = mBaseX - rawEvent.getX(pointerIndex); in isSecondFingerInsideSlop()
152 final float deltaY = mBaseY - rawEvent.getY(pointerIndex); in isSecondFingerInsideSlop()
DTouchState.java520 private void handleReceivedPointerDown(int pointerIndex, MotionEvent event) { in handleReceivedPointerDown() argument
521 final int pointerId = event.getPointerId(pointerIndex); in handleReceivedPointerDown()
527 event.getX(pointerIndex), event.getY(pointerIndex), event.getEventTime()); in handleReceivedPointerDown()
539 private void handleReceivedPointerUp(int pointerIndex, MotionEvent event) { in handleReceivedPointerUp() argument
540 final int pointerId = event.getPointerId(pointerIndex); in handleReceivedPointerUp()
/frameworks/native/include/input/
DInput.h713 inline const PointerProperties* getPointerProperties(size_t pointerIndex) const { in getPointerProperties() argument
714 return &mPointerProperties[pointerIndex]; in getPointerProperties()
717 inline int32_t getPointerId(size_t pointerIndex) const { in getPointerId() argument
718 return mPointerProperties[pointerIndex].id; in getPointerId()
721 inline ToolType getToolType(size_t pointerIndex) const { in getToolType() argument
722 return mPointerProperties[pointerIndex].toolType; in getToolType()
731 const PointerCoords* getRawPointerCoords(size_t pointerIndex) const;
738 float getRawAxisValue(int32_t axis, size_t pointerIndex) const;
740 inline float getRawX(size_t pointerIndex) const { in getRawX() argument
741 return getRawAxisValue(AMOTION_EVENT_AXIS_X, pointerIndex); in getRawX()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/touch/
DSwipeDetector.java74 abstract float getDisplacement(MotionEvent ev, int pointerIndex, PointF refPoint); in getDisplacement() argument
79 abstract float getActiveTouchSlop(MotionEvent ev, int pointerIndex, PointF downPos); in getActiveTouchSlop() argument
85 float getDisplacement(MotionEvent ev, int pointerIndex, PointF refPoint) {
86 return ev.getY(pointerIndex) - refPoint.y;
90 float getActiveTouchSlop(MotionEvent ev, int pointerIndex, PointF downPos) {
91 return Math.abs(ev.getX(pointerIndex) - downPos.x);
98 float getDisplacement(MotionEvent ev, int pointerIndex, PointF refPoint) {
99 return ev.getX(pointerIndex) - refPoint.x;
103 float getActiveTouchSlop(MotionEvent ev, int pointerIndex, PointF downPos) {
104 return Math.abs(ev.getY(pointerIndex) - downPos.y);
[all …]
/frameworks/base/core/java/android/view/
DMotionEvent.java1816 int pointerIndex, int historyPos, PointerCoords outPointerCoords); in nativeGetPointerCoords() argument
1818 int pointerIndex, PointerProperties outPointerProperties); in nativeGetPointerProperties() argument
1829 private static native int nativeGetPointerId(long nativePtr, int pointerIndex); in nativeGetPointerId() argument
1831 private static native int nativeGetToolType(long nativePtr, int pointerIndex); in nativeGetToolType() argument
1837 int axis, int pointerIndex, int historyPos); in nativeGetRawAxisValue() argument
1840 int axis, int pointerIndex, int historyPos); in nativeGetAxisValue() argument
2720 public final int getPointerId(int pointerIndex) { in getPointerId() argument
2721 return nativeGetPointerId(mNativePtr, pointerIndex); in getPointerId()
2738 public @ToolType int getToolType(int pointerIndex) { in getToolType() argument
2739 return nativeGetToolType(mNativePtr, pointerIndex); in getToolType()
[all …]
/frameworks/base/core/java/com/android/internal/policy/
DWearGestureInterceptionDetector.java78 int pointerIndex = ev.findPointerIndex(mActivePointerId); in getIndexForValidPointer() local
79 if (pointerIndex == -1) { in getIndexForValidPointer()
85 return pointerIndex; in getIndexForValidPointer()
100 private void updateDiscardIntercept(MotionEvent ev, int pointerIndex) {
109 final float x = ev.getX(pointerIndex);
110 final float y = ev.getY(pointerIndex);
154 final int pointerIndex = getIndexForValidPointer(ev);
155 if (pointerIndex == -1) {
159 updateDiscardIntercept(ev, pointerIndex);
/frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/udfps/
DSinglePointerTouchProcessor.kt137 pointerIndex: Int, in normalize()
140 val naturalTouch: PointF = rotateToNaturalOrientation(pointerIndex, overlayParams) in normalize()
143 val nativeMinor: Float = getTouchMinor(pointerIndex) / overlayParams.scaleFactor in normalize()
144 val nativeMajor: Float = getTouchMajor(pointerIndex) / overlayParams.scaleFactor in normalize()
145 var nativeOrientation: Float = getOrientation(pointerIndex) in normalize()
150 pointerId = getPointerId(pointerIndex), in normalize()
171 pointerIndex: Int, in rotateToNaturalOrientation()
174 val touchPoint = PointF(getRawX(pointerIndex), getRawY(pointerIndex)) in rotateToNaturalOrientation()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/
DPipTouchState.java150 int pointerIndex = ev.findPointerIndex(mActivePointerId); in onTouchEvent()
151 if (pointerIndex == -1) { in onTouchEvent()
157 float x = ev.getRawX(pointerIndex); in onTouchEvent()
158 float y = ev.getRawY(pointerIndex); in onTouchEvent()
183 int pointerIndex = ev.getActionIndex(); in onTouchEvent() local
184 int pointerId = ev.getPointerId(pointerIndex); in onTouchEvent()
187 final int newPointerIndex = (pointerIndex == 0) ? 1 : 0; in onTouchEvent()
210 int pointerIndex = ev.findPointerIndex(mActivePointerId); in onTouchEvent() local
211 if (pointerIndex == -1) { in onTouchEvent()
218 mLastTouch.set(ev.getRawX(pointerIndex), ev.getRawY(pointerIndex)); in onTouchEvent()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/
DPipTouchState.java150 int pointerIndex = ev.findPointerIndex(mActivePointerId); in onTouchEvent()
151 if (pointerIndex == -1) { in onTouchEvent()
157 float x = ev.getRawX(pointerIndex); in onTouchEvent()
158 float y = ev.getRawY(pointerIndex); in onTouchEvent()
183 int pointerIndex = ev.getActionIndex(); in onTouchEvent() local
184 int pointerId = ev.getPointerId(pointerIndex); in onTouchEvent()
187 final int newPointerIndex = (pointerIndex == 0) ? 1 : 0; in onTouchEvent()
210 int pointerIndex = ev.findPointerIndex(mActivePointerId); in onTouchEvent() local
211 if (pointerIndex == -1) { in onTouchEvent()
218 mLastTouch.set(ev.getRawX(pointerIndex), ev.getRawY(pointerIndex)); in onTouchEvent()
/frameworks/native/services/inputflinger/tests/
DTestEventMatchers.h282 explicit WithCoordsMatcher(size_t pointerIndex, float x, float y) in WithCoordsMatcher() argument
283 : mPointerIndex(pointerIndex), mX(x), mY(y) {} in WithCoordsMatcher()
332 inline WithCoordsMatcher WithPointerCoords(size_t pointerIndex, float x, float y) { in WithPointerCoords() argument
333 return WithCoordsMatcher(pointerIndex, x, y); in WithPointerCoords()
340 explicit WithRawCoordsMatcher(size_t pointerIndex, float rawX, float rawY) in WithRawCoordsMatcher() argument
341 : mPointerIndex(pointerIndex), mRawX(rawX), mRawY(rawY) {} in WithRawCoordsMatcher()
376 inline WithRawCoordsMatcher WithPointerRawCoords(size_t pointerIndex, float rawX, float rawY) { in WithPointerRawCoords() argument
377 return WithRawCoordsMatcher(pointerIndex, rawX, rawY); in WithPointerRawCoords()
424 for (size_t pointerIndex = 0; pointerIndex < event.getPointerCount(); pointerIndex++) { in MatchAndExplain() local
425 const int32_t pointerId = event.getPointerId(pointerIndex); in MatchAndExplain()
[all …]
/frameworks/base/core/jni/
Dandroid_view_MotionEvent.cpp168 static bool validatePointerIndex(JNIEnv* env, jint pointerIndex, const MotionEvent& event) { in validatePointerIndex() argument
169 if (pointerIndex < 0 || size_t(pointerIndex) >= event.getPointerCount()) { in validatePointerIndex()
171 message << "invalid pointerIndex " << pointerIndex << " for " << event; in validatePointerIndex()
423 jlong nativePtr, jint pointerIndex, jint historyPos, jobject outPointerCoordsObj) { in android_view_MotionEvent_nativeGetPointerCoords() argument
425 if (!validatePointerIndex(env, pointerIndex, *event) || in android_view_MotionEvent_nativeGetPointerCoords()
450 ? event->getAxisValue(axis, pointerIndex) in android_view_MotionEvent_nativeGetPointerCoords()
451 : event->getHistoricalAxisValue(axis, pointerIndex, historyPos); in android_view_MotionEvent_nativeGetPointerCoords()
456 ? event->getRawPointerCoords(pointerIndex) in android_view_MotionEvent_nativeGetPointerCoords()
457 : event->getHistoricalRawPointerCoords(pointerIndex, historyPos); in android_view_MotionEvent_nativeGetPointerCoords()
466 ? event->isResampled(pointerIndex, event->getHistorySize()) in android_view_MotionEvent_nativeGetPointerCoords()
[all …]
/frameworks/opt/photoviewer/src/com/android/ex/photo/
DPhotoViewPager.java139 final int pointerIndex = in onInterceptTouchEvent() local
141 final float x = MotionEventCompat.getX(ev, pointerIndex); in onInterceptTouchEvent()
168 final int pointerIndex = MotionEventCompat.getActionIndex(ev); in onInterceptTouchEvent() local
169 final int pointerId = MotionEventCompat.getPointerId(ev, pointerIndex); in onInterceptTouchEvent()
172 final int newPointerIndex = pointerIndex == 0 ? 1 : 0; in onInterceptTouchEvent()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DHeadsUpTouchHelper.java71 int pointerIndex = event.findPointerIndex(mTrackingPointer); in onInterceptTouchEvent() local
72 if (pointerIndex < 0) { in onInterceptTouchEvent()
73 pointerIndex = 0; in onInterceptTouchEvent()
74 mTrackingPointer = event.getPointerId(pointerIndex); in onInterceptTouchEvent()
76 final float x = event.getX(pointerIndex); in onInterceptTouchEvent()
77 final float y = event.getY(pointerIndex); in onInterceptTouchEvent()
/frameworks/base/services/accessibility/java/com/android/server/accessibility/
DAutoclickController.java376 final int pointerIndex = mLastMotionEvent.getActionIndex(); in cacheLastEvent() local
377 mLastMotionEvent.getPointerCoords(pointerIndex, mAnchorCoords); in cacheLastEvent()
399 final int pointerIndex = event.getActionIndex(); in detectMovement() local
400 float deltaX = mAnchorCoords.x - event.getX(pointerIndex); in detectMovement()
401 float deltaY = mAnchorCoords.y - event.getY(pointerIndex); in detectMovement()
414 final int pointerIndex = mLastMotionEvent.getActionIndex(); in sendClick() local
421 mLastMotionEvent.getPointerProperties(pointerIndex, mTempPointerProperties[0]); in sendClick()
427 mLastMotionEvent.getPointerCoords(pointerIndex, mTempPointerCoords[0]); in sendClick()
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/utils/
DTouchEventGenerator.java156 public static MotionEvent movePointer(MotionEvent originalEvent, int pointerIndex, in movePointer() argument
167 if (pointerIndex >= pointerCount) { in movePointer()
169 pointerIndex + "is not available with pointer count" + pointerCount); in movePointer()
185 pc[pointerIndex].x += offsetX; in movePointer()
186 pc[pointerIndex].y += offsetY; in movePointer()
/frameworks/base/core/java/android/widget/
DButton.java180 public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) { in onResolvePointerIcon() argument
190 return super.onResolvePointerIcon(event, pointerIndex); in onResolvePointerIcon()
DImageButton.java107 public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) { in onResolvePointerIcon() argument
116 return super.onResolvePointerIcon(event, pointerIndex); in onResolvePointerIcon()
/frameworks/native/libs/input/
DInput.cpp686 const PointerCoords* MotionEvent::getRawPointerCoords(size_t pointerIndex) const { in getRawPointerCoords()
687 if (CC_UNLIKELY(pointerIndex < 0 || pointerIndex >= getPointerCount())) { in getRawPointerCoords()
688 LOG(FATAL) << __func__ << ": Invalid pointer index " << pointerIndex << " for " << *this; in getRawPointerCoords()
690 const size_t position = getHistorySize() * getPointerCount() + pointerIndex; in getRawPointerCoords()
697 float MotionEvent::getRawAxisValue(int32_t axis, size_t pointerIndex) const { in getRawAxisValue()
698 return getHistoricalRawAxisValue(axis, pointerIndex, getHistorySize()); in getRawAxisValue()
701 float MotionEvent::getAxisValue(int32_t axis, size_t pointerIndex) const { in getAxisValue()
702 return getHistoricalAxisValue(axis, pointerIndex, getHistorySize()); in getAxisValue()
706 size_t pointerIndex, size_t historicalIndex) const { in getHistoricalRawPointerCoords() argument
707 if (CC_UNLIKELY(pointerIndex < 0 || pointerIndex >= getPointerCount())) { in getHistoricalRawPointerCoords()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/
DKeyguardQuickAffordanceOnTouchListener.kt152 pointerIndex: Int = 0, in isUsingAccurateTool()
154 return when (event.getToolType(pointerIndex)) { in isUsingAccurateTool()
/frameworks/rs/tests/java_api/Balls/src/com/example/android/rs/balls/
DBallsView.java82 int pointerIndex = ev.getActionIndex(); in onTouchEvent() local
83 int pointerId = ev.getPointerId(pointerIndex); in onTouchEvent()
/frameworks/base/services/core/java/com/android/server/wm/
DSystemGesturesPointerEventListener.java300 private void captureDown(MotionEvent event, int pointerIndex) { in captureDown() argument
301 final int pointerId = event.getPointerId(pointerIndex); in captureDown()
304 + " down pointerIndex=" + pointerIndex + " trackingIndex=" + i); in captureDown()
306 mDownX[i] = event.getX(pointerIndex); in captureDown()
307 mDownY[i] = event.getY(pointerIndex); in captureDown()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/gesture/
DGesturePointerEventListener.kt279 private fun captureDown(event: MotionEvent, pointerIndex: Int) { in <lambda>()
280 val pointerId = event.getPointerId(pointerIndex) in <lambda>()
282 if (DEBUG) Log.d(TAG, "pointer $pointerId down pointerIndex=$pointerIndex trackingIndex=$i") in <lambda>()
284 mDownX[i] = event.getX(pointerIndex) in <lambda>()
285 mDownY[i] = event.getY(pointerIndex) in <lambda>()
/frameworks/base/core/java/com/android/internal/widget/helper/
DItemTouchHelper.java387 final int pointerIndex = event.getActionIndex();
388 final int pointerId = event.getPointerId(pointerIndex);
392 final int newPointerIndex = pointerIndex == 0 ? 1 : 0;
394 updateDxDy(event, mSelectedFlags, pointerIndex);
918 final int pointerIndex = motionEvent.findPointerIndex(mActivePointerId); in findSwipedView() local
919 final float dx = motionEvent.getX(pointerIndex) - mInitialTouchX; in findSwipedView()
920 final float dy = motionEvent.getY(pointerIndex) - mInitialTouchY; in findSwipedView()
942 boolean checkSelectForSwipe(int action, MotionEvent motionEvent, int pointerIndex) { in checkSelectForSwipe() argument
965 final float x = motionEvent.getX(pointerIndex); in checkSelectForSwipe()
966 final float y = motionEvent.getY(pointerIndex); in checkSelectForSwipe()
[all …]

123