/frameworks/base/services/accessibility/java/com/android/server/accessibility/gestures/ |
D | MultiFingerSwipe.java | 130 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 …]
|
D | EventDispatcher.java | 236 private int computeInjectionAction(int actionMasked, int pointerIndex) { in computeInjectionAction() argument 244 return (pointerIndex << MotionEvent.ACTION_POINTER_INDEX_SHIFT) in computeInjectionAction() 252 return (pointerIndex << MotionEvent.ACTION_POINTER_INDEX_SHIFT) in computeInjectionAction() 391 final int pointerIndex = event.getActionIndex(); in longPressWithTouchEvents() local 392 final int pointerId = event.getPointerId(pointerIndex); in longPressWithTouchEvents() 394 mLongPressingPointerDeltaX = (int) event.getX(pointerIndex) - clickLocation.x; in longPressWithTouchEvents() 395 mLongPressingPointerDeltaY = (int) event.getY(pointerIndex) - clickLocation.y; in longPressWithTouchEvents() 409 final int pointerIndex = event.getActionIndex(); in clickWithTouchEvents() local 410 final int pointerId = event.getPointerId(pointerIndex); in clickWithTouchEvents() 422 event.getPointerProperties(pointerIndex, properties[0]); in clickWithTouchEvents()
|
D | SecondFingerMultiTap.java | 147 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()
|
D | TouchState.java | 517 private void handleReceivedPointerDown(int pointerIndex, MotionEvent event) { in handleReceivedPointerDown() argument 518 final int pointerId = event.getPointerId(pointerIndex); in handleReceivedPointerDown() 524 event.getX(pointerIndex), event.getY(pointerIndex), event.getEventTime()); in handleReceivedPointerDown() 535 private void handleReceivedPointerUp(int pointerIndex, MotionEvent event) { in handleReceivedPointerUp() argument 536 final int pointerId = event.getPointerId(pointerIndex); in handleReceivedPointerUp()
|
/frameworks/native/include/input/ |
D | Input.h | 600 inline const PointerProperties* getPointerProperties(size_t pointerIndex) const { in getPointerProperties() argument 601 return &mPointerProperties[pointerIndex]; in getPointerProperties() 604 inline int32_t getPointerId(size_t pointerIndex) const { in getPointerId() argument 605 return mPointerProperties[pointerIndex].id; in getPointerId() 608 inline int32_t getToolType(size_t pointerIndex) const { in getToolType() argument 609 return mPointerProperties[pointerIndex].toolType; in getToolType() 618 const PointerCoords* getRawPointerCoords(size_t pointerIndex) const; 625 float getRawAxisValue(int32_t axis, size_t pointerIndex) const; 627 inline float getRawX(size_t pointerIndex) const { in getRawX() argument 628 return getRawAxisValue(AMOTION_EVENT_AXIS_X, pointerIndex); in getRawX() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/touch/ |
D | SwipeDetector.java | 74 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/ |
D | MotionEvent.java | 1575 int pointerIndex, int historyPos, PointerCoords outPointerCoords); in nativeGetPointerCoords() argument 1577 int pointerIndex, PointerProperties outPointerProperties); in nativeGetPointerProperties() argument 1588 private static native int nativeGetPointerId(long nativePtr, int pointerIndex); in nativeGetPointerId() argument 1590 private static native int nativeGetToolType(long nativePtr, int pointerIndex); in nativeGetToolType() argument 1596 int axis, int pointerIndex, int historyPos); in nativeGetRawAxisValue() argument 1599 int axis, int pointerIndex, int historyPos); in nativeGetAxisValue() argument 2407 public final int getPointerId(int pointerIndex) { in getPointerId() argument 2408 return nativeGetPointerId(mNativePtr, pointerIndex); in getPointerId() 2425 public final int getToolType(int pointerIndex) { in getToolType() argument 2426 return nativeGetToolType(mNativePtr, pointerIndex); in getToolType() [all …]
|
D | HandwritingInitiator.java | 153 final int pointerIndex = motionEvent.findPointerIndex(mState.mStylusPointerId); in onTouchEvent() local 154 final float x = motionEvent.getX(pointerIndex); in onTouchEvent() 155 final float y = motionEvent.getY(pointerIndex); in onTouchEvent()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/udfps/ |
D | SinglePointerTouchProcessor.kt | 127 pointerIndex: Int, in normalize() 130 val naturalTouch: PointF = rotateToNaturalOrientation(pointerIndex, overlayParams) in normalize() 133 val nativeMinor: Float = getTouchMinor(pointerIndex) / overlayParams.scaleFactor in normalize() 134 val nativeMajor: Float = getTouchMajor(pointerIndex) / overlayParams.scaleFactor in normalize() 135 var nativeOrientation: Float = getOrientation(pointerIndex) in normalize() 140 pointerId = getPointerId(pointerIndex), in normalize() 161 pointerIndex: Int, in rotateToNaturalOrientation() 164 val touchPoint = PointF(getRawX(pointerIndex), getRawY(pointerIndex)) in rotateToNaturalOrientation()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/ |
D | PipTouchState.java | 133 int pointerIndex = ev.findPointerIndex(mActivePointerId); in onTouchEvent() 134 if (pointerIndex == -1) { in onTouchEvent() 140 float x = ev.getRawX(pointerIndex); in onTouchEvent() 141 float y = ev.getRawY(pointerIndex); in onTouchEvent() 166 int pointerIndex = ev.getActionIndex(); in onTouchEvent() local 167 int pointerId = ev.getPointerId(pointerIndex); in onTouchEvent() 170 final int newPointerIndex = (pointerIndex == 0) ? 1 : 0; in onTouchEvent() 193 int pointerIndex = ev.findPointerIndex(mActivePointerId); in onTouchEvent() local 194 if (pointerIndex == -1) { in onTouchEvent() 201 mLastTouch.set(ev.getRawX(pointerIndex), ev.getRawY(pointerIndex)); in onTouchEvent()
|
/frameworks/base/core/jni/ |
D | android_view_MotionEvent.cpp | 161 static bool validatePointerIndex(JNIEnv* env, jint pointerIndex, const MotionEvent& event) { in validatePointerIndex() argument 162 if (pointerIndex < 0 || size_t(pointerIndex) >= event.getPointerCount()) { in validatePointerIndex() 164 message << "invalid pointerIndex " << pointerIndex << " for " << event; in validatePointerIndex() 402 jlong nativePtr, jint pointerIndex, jint historyPos, jobject outPointerCoordsObj) { in android_view_MotionEvent_nativeGetPointerCoords() argument 404 if (!validatePointerIndex(env, pointerIndex, *event) || in android_view_MotionEvent_nativeGetPointerCoords() 429 ? event->getAxisValue(axis, pointerIndex) in android_view_MotionEvent_nativeGetPointerCoords() 430 : event->getHistoricalAxisValue(axis, pointerIndex, historyPos); in android_view_MotionEvent_nativeGetPointerCoords() 435 ? event->getRawPointerCoords(pointerIndex) in android_view_MotionEvent_nativeGetPointerCoords() 436 : event->getHistoricalRawPointerCoords(pointerIndex, historyPos); in android_view_MotionEvent_nativeGetPointerCoords() 446 jlong nativePtr, jint pointerIndex, jobject outPointerPropertiesObj) { in android_view_MotionEvent_nativeGetPointerProperties() argument [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | HeadsUpTouchHelper.java | 66 int pointerIndex = event.findPointerIndex(mTrackingPointer); in onInterceptTouchEvent() local 67 if (pointerIndex < 0) { in onInterceptTouchEvent() 68 pointerIndex = 0; in onInterceptTouchEvent() 69 mTrackingPointer = event.getPointerId(pointerIndex); in onInterceptTouchEvent() 71 final float x = event.getX(pointerIndex); in onInterceptTouchEvent() 72 final float y = event.getY(pointerIndex); in onInterceptTouchEvent()
|
/frameworks/opt/photoviewer/src/com/android/ex/photo/ |
D | PhotoViewPager.java | 139 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/services/tests/servicestests/src/com/android/server/accessibility/utils/ |
D | TouchEventGenerator.java | 130 public static MotionEvent movePointer(MotionEvent originalEvent, int pointerIndex, in movePointer() argument 141 if (pointerIndex >= pointerCount) { in movePointer() 143 pointerIndex + "is not available with pointer count" + pointerCount); in movePointer() 159 pc[pointerIndex].x += offsetX; in movePointer() 160 pc[pointerIndex].y += offsetY; in movePointer()
|
/frameworks/base/services/accessibility/java/com/android/server/accessibility/ |
D | AutoclickController.java | 376 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/native/libs/input/ |
D | Input.cpp | 566 const PointerCoords* MotionEvent::getRawPointerCoords(size_t pointerIndex) const { in getRawPointerCoords() 567 if (CC_UNLIKELY(pointerIndex < 0 || pointerIndex >= getPointerCount())) { in getRawPointerCoords() 568 LOG(FATAL) << __func__ << ": Invalid pointer index " << pointerIndex << " for " << *this; in getRawPointerCoords() 570 const size_t position = getHistorySize() * getPointerCount() + pointerIndex; in getRawPointerCoords() 577 float MotionEvent::getRawAxisValue(int32_t axis, size_t pointerIndex) const { in getRawAxisValue() 578 return getHistoricalRawAxisValue(axis, pointerIndex, getHistorySize()); in getRawAxisValue() 581 float MotionEvent::getAxisValue(int32_t axis, size_t pointerIndex) const { in getAxisValue() 582 return getHistoricalAxisValue(axis, pointerIndex, getHistorySize()); in getAxisValue() 586 size_t pointerIndex, size_t historicalIndex) const { in getHistoricalRawPointerCoords() argument 587 if (CC_UNLIKELY(pointerIndex < 0 || pointerIndex >= getPointerCount())) { in getHistoricalRawPointerCoords() [all …]
|
/frameworks/base/core/java/android/widget/ |
D | ImageButton.java | 101 public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) { in onResolvePointerIcon() argument 105 return super.onResolvePointerIcon(event, pointerIndex); in onResolvePointerIcon()
|
D | Button.java | 175 public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) { in onResolvePointerIcon() argument 179 return super.onResolvePointerIcon(event, pointerIndex); in onResolvePointerIcon()
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | SystemGesturesPointerEventListener.java | 238 private void captureDown(MotionEvent event, int pointerIndex) { in captureDown() argument 239 final int pointerId = event.getPointerId(pointerIndex); in captureDown() 242 + " down pointerIndex=" + pointerIndex + " trackingIndex=" + i); in captureDown() 244 mDownX[i] = event.getX(pointerIndex); in captureDown() 245 mDownY[i] = event.getY(pointerIndex); in captureDown()
|
/frameworks/native/libs/input/tests/ |
D | VelocityTracker_test.cpp | 163 uint32_t pointerIndex = 0; in createMotionEventStream() local 167 coords[pointerIndex].clear(); in createMotionEventStream() 171 coords[pointerIndex].setAxisValue(AMOTION_EVENT_AXIS_X, entry.positions[pointerId].x); in createMotionEventStream() 172 coords[pointerIndex].setAxisValue(AMOTION_EVENT_AXIS_Y, entry.positions[pointerId].y); in createMotionEventStream() 174 properties[pointerIndex].id = pointerId; in createMotionEventStream() 175 properties[pointerIndex].toolType = AMOTION_EVENT_TOOL_TYPE_FINGER; in createMotionEventStream() 176 pointerIndex++; in createMotionEventStream() 178 EXPECT_EQ(pointerIndex, pointerCount); in createMotionEventStream()
|
/frameworks/rs/tests/java_api/Balls/src/com/example/android/rs/balls/ |
D | BallsView.java | 82 int pointerIndex = ev.getActionIndex(); in onTouchEvent() local 83 int pointerId = ev.getPointerId(pointerIndex); in onTouchEvent()
|
/frameworks/native/services/inputflinger/reader/mapper/ |
D | TouchInputMapper.h | 98 inline bool isHovering(uint32_t pointerIndex) { return pointers[pointerIndex].isHovering; } in isHovering() 125 inline bool isHovering(uint32_t pointerIndex) const { in isHovering() 126 return hoveringIdBits.hasBit(pointerProperties[pointerIndex].id); in isHovering() 129 inline bool isTouching(uint32_t pointerIndex) const { in isTouching() 130 return touchingIdBits.hasBit(pointerProperties[pointerIndex].id); in isTouching()
|
/frameworks/base/core/java/com/android/internal/widget/helper/ |
D | ItemTouchHelper.java | 387 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 …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/ |
D | CropView.java | 180 int pointerIndex = event.findPointerIndex(mActivePointerId); in onTouchEvent() local 181 if (pointerIndex >= 0) { in onTouchEvent() 184 ? event.getY(pointerIndex) - mStartingY in onTouchEvent() 185 : event.getX(pointerIndex) - mStartingX; in onTouchEvent() 190 updateListener(MotionEvent.ACTION_MOVE, event.getX(pointerIndex)); in onTouchEvent()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/shade/ |
D | QuickSettingsController.java | 1595 int pointerIndex = event.findPointerIndex(mTrackingPointer); in onTouch() local 1596 if (pointerIndex < 0) { in onTouch() 1597 pointerIndex = 0; in onTouch() 1598 mTrackingPointer = event.getPointerId(pointerIndex); in onTouch() 1600 final float y = event.getY(pointerIndex); in onTouch() 1601 final float x = event.getX(pointerIndex); in onTouch() 1666 int pointerIndex = event.findPointerIndex(mTrackingPointer); in onIntercept() local 1667 if (pointerIndex < 0) { in onIntercept() 1668 pointerIndex = 0; in onIntercept() 1669 mTrackingPointer = event.getPointerId(pointerIndex); in onIntercept() [all …]
|