Home
last modified time | relevance | path

Searched refs:pointerId (Results 1 – 25 of 94) sorted by relevance

1234

/frameworks/base/services/accessibility/java/com/android/server/accessibility/gestures/
DTouchState.java151 final int pointerId = event.getPointerId(event.getActionIndex()); in onInjectedMotionEvent() local
152 final int pointerFlag = (1 << pointerId); in onInjectedMotionEvent()
407 public boolean isInjectedPointerDown(int pointerId) { in isInjectedPointerDown() argument
408 final int pointerFlag = (1 << pointerId); in isInjectedPointerDown()
496 public boolean isReceivedPointerDown(int pointerId) { in isReceivedPointerDown() argument
497 final int pointerFlag = (1 << pointerId); in isReceivedPointerDown()
505 public float getReceivedPointerDownX(int pointerId) { in getReceivedPointerDownX() argument
506 return mReceivedPointers[pointerId].mX; in getReceivedPointerDownX()
513 public float getReceivedPointerDownY(int pointerId) { in getReceivedPointerDownY() argument
514 return mReceivedPointers[pointerId].mY; in getReceivedPointerDownY()
[all …]
DEventDispatcher.java293 final int pointerId = prototype.getPointerId(i); in sendDownForAllNotInjectedPointers() local
295 if (!mState.isInjectedPointerDown(pointerId)) { in sendDownForAllNotInjectedPointers()
296 pointerIdBits |= (1 << pointerId); in sendDownForAllNotInjectedPointers()
324 final int pointerId = prototype.getPointerId(i); in sendDownForAllNotInjectedPointersWithOriginalDown() local
326 if (!mState.isInjectedPointerDown(pointerId)) { in sendDownForAllNotInjectedPointersWithOriginalDown()
327 pointerIdBits |= (1 << pointerId); in sendDownForAllNotInjectedPointersWithOriginalDown()
350 final int pointerId = prototype.getPointerId(i); in computeInjectionDownEvent() local
351 final float x = mState.getReceivedPointerTracker().getReceivedPointerDownX(pointerId); in computeInjectionDownEvent()
352 final float y = mState.getReceivedPointerTracker().getReceivedPointerDownY(pointerId); in computeInjectionDownEvent()
357 properties[i].id = pointerId; in computeInjectionDownEvent()
[all …]
DTouchExplorer.java495 final int pointerId = mReceivedPointerTracker.getPrimaryPointerId(); in onGestureCancelled() local
496 final int pointerIdBits = (1 << pointerId); in onGestureCancelled()
561 final int pointerId = mReceivedPointerTracker.getPrimaryPointerId(); in handleActionDown() local
562 final int pointerIdBits = (1 << pointerId); in handleActionDown()
695 final int pointerId = mReceivedPointerTracker.getPrimaryPointerId(); in handleActionMoveStateTouchInteracting() local
696 final int pointerIndex = event.findPointerIndex(pointerId); in handleActionMoveStateTouchInteracting()
697 int pointerIdBits = (1 << pointerId); in handleActionMoveStateTouchInteracting()
845 final int pointerId = event.getPointerId(event.getActionIndex()); in handleActionUp() local
846 final int pointerIdBits = (1 << pointerId); in handleActionUp()
877 final int pointerId = mReceivedPointerTracker.getPrimaryPointerId(); in handleActionMoveStateTouchExploring() local
[all …]
DMultiFingerSwipe.java129 final int pointerId = rawEvent.getPointerId(actionIndex); in onDown() local
131 if (pointerId < 0) { in onDown()
141 mPointerIds[pointerIndex] = pointerId; in onDown()
175 final int pointerId = rawEvent.getPointerId(actionIndex); in onPointerDown() local
176 if (pointerId < 0) { in onPointerDown()
187 mPointerIds[pointerIndex] = pointerId; in onPointerDown()
213 final int pointerId = event.getPointerId(actionIndex); in onPointerUp() local
214 if (pointerId < 0) { in onPointerUp()
219 final int pointerIndex = Arrays.binarySearch(mPointerIds, pointerId); in onPointerUp()
325 final int pointerId = event.getPointerId(actionIndex); in onUp() local
[all …]
/frameworks/native/include/input/
DVelocityTracker.h95 void clearPointer(int32_t pointerId);
98 void addMovement(nsecs_t eventTime, int32_t pointerId, int32_t axis, float position);
106 std::optional<float> getVelocity(int32_t axis, int32_t pointerId) const;
151 virtual void clearPointer(int32_t pointerId) = 0;
152 virtual void addMovement(nsecs_t eventTime, int32_t pointerId, float position) = 0;
153 virtual std::optional<float> getVelocity(int32_t pointerId) const = 0;
164 void addMovement(nsecs_t eventTime, int32_t pointerId, float position) override;
165 void clearPointer(int32_t pointerId) override;
215 std::optional<float> getVelocity(int32_t pointerId) const override;
223 float chooseWeight(int32_t pointerId, uint32_t index) const;
[all …]
/frameworks/native/libs/input/
DVelocityTracker.cpp224 void VelocityTracker::clearPointer(int32_t pointerId) { in clearPointer() argument
225 mCurrentPointerIdBits.clearBit(pointerId); in clearPointer()
227 if (mActivePointerId && *mActivePointerId == pointerId) { in clearPointer()
237 strategy->clearPointer(pointerId); in clearPointer()
241 void VelocityTracker::addMovement(nsecs_t eventTime, int32_t pointerId, int32_t axis, in addMovement() argument
243 if (pointerId < 0 || pointerId > MAX_POINTER_ID) { in addMovement()
244 LOG(FATAL) << "Invalid pointer ID " << pointerId << " for axis " in addMovement()
248 if (mCurrentPointerIdBits.hasBit(pointerId) && in addMovement()
259 mCurrentPointerIdBits.markBit(pointerId); in addMovement()
262 mActivePointerId = pointerId; in addMovement()
[all …]
DVirtualInputDevice.cpp576 bool VirtualTouchscreen::isValidPointerId(int32_t pointerId, UinputAction uinputAction) { in isValidPointerId() argument
577 if (pointerId < -1 || pointerId >= (int)MAX_POINTERS) { in isValidPointerId()
579 pointerId, MAX_POINTERS - 0); in isValidPointerId()
583 if (uinputAction == UinputAction::PRESS && mActivePointers.test(pointerId)) { in isValidPointerId()
585 pointerId); in isValidPointerId()
588 if (uinputAction == UinputAction::RELEASE && !mActivePointers.test(pointerId)) { in isValidPointerId()
590 pointerId, mFd.get()); in isValidPointerId()
596 bool VirtualTouchscreen::writeTouchEvent(int32_t pointerId, int32_t toolType, int32_t action, in writeTouchEvent() argument
604 if (!isValidPointerId(pointerId, uinputAction)) { in writeTouchEvent()
607 if (!writeInputEvent(EV_ABS, ABS_MT_SLOT, pointerId, eventTime)) { in writeTouchEvent()
[all …]
/frameworks/native/services/inputflinger/dispatcher/
DTouchedWindow.cpp32 bool hasPointerId(const std::vector<PointerProperties>& pointers, int32_t pointerId) { in hasPointerId() argument
34 [&pointerId](const PointerProperties& properties) { in hasPointerId()
35 return properties.id == pointerId; in hasPointerId()
39 bool hasPointerId(const std::vector<TouchedWindow::HoveringPointer>& pointers, int32_t pointerId) { in hasPointerId() argument
41 [&pointerId](const TouchedWindow::HoveringPointer& pointer) { in hasPointerId()
42 return pointer.properties.id == pointerId; in hasPointerId()
79 bool TouchedWindow::hasHoveringPointer(DeviceId deviceId, int32_t pointerId) const { in hasHoveringPointer()
85 return hasPointerId(state.hoveringPointers, pointerId); in hasHoveringPointer()
134 bool TouchedWindow::hasTouchingPointer(DeviceId deviceId, int32_t pointerId) const { in hasTouchingPointer()
140 return hasPointerId(state.touchingPointers, pointerId); in hasTouchingPointer()
[all …]
DDragState.h30 int32_t pointerId) in DragState()
31 : dragWindow(windowHandle), deviceId(deviceId), pointerId(pointerId) {} in DragState()
45 const int32_t pointerId; member
DTouchedWindow.h45 bool hasHoveringPointer(DeviceId deviceId, int32_t pointerId) const;
47 void removeHoveringPointer(DeviceId deviceId, int32_t pointerId);
50 bool hasTouchingPointer(DeviceId deviceId, int32_t pointerId) const;
56 void removeTouchingPointer(DeviceId deviceId, int32_t pointerId);
64 void addPilferingPointer(DeviceId deviceId, int32_t pointerId);
DTouchState.h43 void removeTouchingPointer(DeviceId deviceId, int32_t pointerId);
44 void removeTouchingPointerFromWindow(DeviceId deviceId, int32_t pointerId,
54 void removeHoveringPointer(DeviceId deviceId, int32_t pointerId);
80 DeviceId deviceId, int32_t pointerId) const;
DInputTarget.cpp80 const ui::Transform& InputTarget::getTransformForPointer(int32_t pointerId) const { in getTransformForPointer()
82 if (ids.test(pointerId)) { in getTransformForPointer()
89 << pointerId; in getTransformForPointer()
DTouchState.cpp41 void TouchState::removeTouchingPointer(DeviceId deviceId, int32_t pointerId) { in removeTouchingPointer() argument
43 touchedWindow.removeTouchingPointer(deviceId, pointerId); in removeTouchingPointer()
49 DeviceId deviceId, int32_t pointerId, in removeTouchingPointerFromWindow() argument
53 touchedWindow.removeTouchingPointer(deviceId, pointerId); in removeTouchingPointerFromWindow()
255 int32_t pointerId) const { in getWindowsWithHoveringPointer()
258 if (window.hasHoveringPointer(deviceId, pointerId)) { in getWindowsWithHoveringPointer()
/frameworks/native/services/inputflinger/
DUnwantedInteractionBlocker.cpp132 static int32_t getActionUpForPointerId(const NotifyMotionArgs& args, int32_t pointerId) { in getActionUpForPointerId() argument
134 if (pointerId == args.pointerProperties[i].id) { in getActionUpForPointerId()
139 LOG_ALWAYS_FATAL("Can't find pointerId %" PRId32 " in %s", pointerId, args.dump().c_str()); in getActionUpForPointerId()
176 const int32_t pointerId = args.pointerProperties[i].id; in removePointerIds() local
177 if (pointerIds.find(pointerId) != pointerIds.end()) { in removePointerIds()
302 const int32_t pointerId = oldArgs.pointerProperties[i].id; in cancelSuppressedPointers() local
303 if (newSuppressedPointerIds.find(pointerId) == newSuppressedPointerIds.end()) { in cancelSuppressedPointers()
307 if (pointerId == activePointerId && actionMasked == AMOTION_EVENT_ACTION_POINTER_DOWN) { in cancelSuppressedPointers()
309 removedArgs = removePointerIds(removedArgs, {pointerId}); in cancelSuppressedPointers()
324 out.back().action = getActionUpForPointerId(out.back(), pointerId); in cancelSuppressedPointers()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/udfps/
DSinglePointerTouchProcessor.kt56 .map { it.pointerId } in processTouch()
98 val data = touch.data.find { it.pointerId == pointerOnSensorId } ?: NormalizedTouchData() in processActionMove()
99 ProcessedTouch(InteractionEvent.DOWN, data.pointerId, data) in processActionMove()
102 touch.data.find { it.pointerId == touch.previousPointerOnSensorId } in processActionMove()
107 touch.data.find { it.pointerId == pointerOnSensorId } in processActionMove()
116 val data = touch.data.find { it.pointerId == actionId } ?: NormalizedTouchData() in processActionUp()
122 touch.data.find { it.pointerId == pointerOnSensorId } in processActionUp()
150 pointerId = getPointerId(pointerIndex), in normalize()
DNormalizedTouchData.kt29 val pointerId: Int = MotionEvent.INVALID_POINTER_ID, constant in com.android.systemui.biometrics.udfps.NormalizedTouchData
70 | pointerId: $pointerId
/frameworks/base/services/core/java/com/android/server/tv/
DUinputBridge.java38 private static native void nativeSendPointerDown(long ptr, int pointerId, int x, int y); in nativeSendPointerDown() argument
39 private static native void nativeSendPointerUp(long ptr, int pointerId); in nativeSendPointerUp() argument
150 public void sendPointerDown(IBinder token, int pointerId, int x, int y) { in sendPointerDown() argument
152 nativeSendPointerDown(mPtr, pointerId, x, y); in sendPointerDown()
156 public void sendPointerUp(IBinder token, int pointerId) { in sendPointerUp() argument
158 nativeSendPointerUp(mPtr, pointerId); in sendPointerUp()
/frameworks/base/core/java/android/hardware/input/
DVirtualTouchEvent.java101 private VirtualTouchEvent(int pointerId, @ToolType int toolType, @Action int action, in VirtualTouchEvent() argument
103 mPointerId = pointerId; in VirtualTouchEvent()
257 @IntRange(from = 0, to = MAX_POINTERS - 1) int pointerId) { in setPointerId()
258 if (pointerId < 0 || pointerId > 15) { in setPointerId()
261 + "inclusive, but was: " + pointerId); in setPointerId()
263 mPointerId = pointerId; in setPointerId()
/frameworks/base/services/core/jni/
Dcom_android_server_tv_TvUinputBridge.cpp115 static int findSlot(int32_t pointerId) { in findSlot() argument
116 std::unordered_map<int, int>::iterator it = slotsMap.find(pointerId); in findSlot()
123 static int assignSlot(int32_t pointerId) { in assignSlot() argument
126 slotsMap[pointerId] = slot; in assignSlot()
132 static void unassignSlot(int32_t pointerId) { in unassignSlot() argument
133 int slot = findSlot(pointerId); in unassignSlot()
136 slotsMap.erase(pointerId); in unassignSlot()
450 jint pointerId, jint x, jint y) { in nativeSendPointerDown() argument
458 int32_t slot = findSlot(pointerId); in nativeSendPointerDown()
460 slot = assignSlot(pointerId); in nativeSendPointerDown()
[all …]
/frameworks/native/libs/input/tests/
DVelocityTracker_test.cpp111 uint32_t pointerId = difference.clearFirstMarkedBit(); in getChangingPointerId() local
113 return pointerId; in getChangingPointerId()
126 uint32_t pointerId = getChangingPointerId(pointers, lastPointers); in resolveAction() local
128 (pointerId << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT); in resolveAction()
135 uint32_t pointerId = getChangingPointerId(pointers, nextPointers); in resolveAction() local
137 (pointerId << AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT); in resolveAction()
199 uint32_t pointerId = pointers.clearFirstMarkedBit(); in createTouchMotionEventStream() local
203 const Position& position = entry.positions[pointerId]; in createTouchMotionEventStream()
204 EXPECT_TRUE(position.isValid()) << "The entry at " << pointerId << " must be valid"; in createTouchMotionEventStream()
209 properties[pointerIndex].id = pointerId; in createTouchMotionEventStream()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/gesture/
DGesturePointerEventListener.kt280 val pointerId = event.getPointerId(pointerIndex) in <lambda>() constant
281 val i = findIndex(pointerId) in <lambda>()
282 if (DEBUG) Log.d(TAG, "pointer $pointerId down pointerIndex=$pointerIndex trackingIndex=$i") in <lambda>()
288 Log.d(TAG, "pointer " + pointerId + " down x=" + mDownX[i] + " y=" + mDownY[i]) in <lambda>()
296 private fun findIndex(pointerId: Int): Int { in <lambda>()
298 if (mDownPointerId[i] == pointerId) { in <lambda>()
302 if (mDownPointers == MAX_TRACKED_POINTERS || pointerId == MotionEvent.INVALID_POINTER_ID) { in <lambda>()
305 mDownPointerId[mDownPointers++] = pointerId in <lambda>()
335 val pointerId = move.getPointerId(p) in <lambda>() constant
336 val i = findIndex(pointerId) in <lambda>()
/frameworks/base/services/core/java/com/android/server/wm/
DSystemGesturesPointerEventListener.java301 final int pointerId = event.getPointerId(pointerIndex); in captureDown() local
302 final int i = findIndex(pointerId); in captureDown()
303 if (DEBUG) Slog.d(TAG, "pointer " + pointerId in captureDown()
309 if (DEBUG) Slog.d(TAG, "pointer " + pointerId in captureDown()
318 private int findIndex(int pointerId) { in findIndex() argument
320 if (mDownPointerId[i] == pointerId) { in findIndex()
324 if (mDownPointers == MAX_TRACKED_POINTERS || pointerId == MotionEvent.INVALID_POINTER_ID) { in findIndex()
327 mDownPointerId[mDownPointers++] = pointerId; in findIndex()
360 final int pointerId = move.getPointerId(p); in detectSwipe() local
361 final int i = findIndex(pointerId); in detectSwipe()
/frameworks/base/core/java/android/accessibilityservice/
DTouchInteractionController.java293 public void requestDragging(int pointerId) { in requestDragging() argument
295 if (pointerId < 0 || pointerId > MAX_POINTER_COUNT) { in requestDragging()
296 throw new IllegalArgumentException("Invalid pointer id: " + pointerId); in requestDragging()
303 connection.requestDragging(mDisplayId, pointerId); in requestDragging()
/frameworks/base/services/accessibility/java/com/android/server/accessibility/
DMotionEventInjector.java514 int pointerId = mStrokeIdToPointerId.get(touchPoints[i].mStrokeId, -1); in obtainMotionEvent() local
515 if (pointerId == -1) { in obtainMotionEvent()
516 pointerId = getUnusedPointerId(); in obtainMotionEvent()
517 mStrokeIdToPointerId.put(touchPoints[i].mStrokeId, pointerId); in obtainMotionEvent()
519 sPointerProps[i].id = pointerId; in obtainMotionEvent()
544 int pointerId = 0; in getUnusedPointerId() local
545 while (mStrokeIdToPointerId.indexOfValue(pointerId) >= 0) { in getUnusedPointerId()
546 pointerId++; in getUnusedPointerId()
547 if (pointerId >= MAX_POINTER_ID) { in getUnusedPointerId()
551 return pointerId; in getUnusedPointerId()
/frameworks/base/media/java/android/media/tv/
DITvRemoteServiceInput.aidl37 void sendPointerDown(IBinder token, int pointerId, int x, int y); in sendPointerDown() argument
39 void sendPointerUp(IBinder token, int pointerId); in sendPointerUp() argument

1234