/packages/modules/Bluetooth/system/btif/co/ |
D | bta_hh_co.cc | 66 static int uhid_write(int fd, const struct uhid_event* ev) { in uhid_write() argument 68 OSI_NO_INTR(ret = write(fd, ev, sizeof(*ev))); in uhid_write() 74 } else if (ret != (ssize_t)sizeof(*ev)) { in uhid_write() 76 ret, sizeof(*ev)); in uhid_write() 87 struct uhid_event ev; in uhid_read_event() local 88 memset(&ev, 0, sizeof(ev)); in uhid_read_event() 91 OSI_NO_INTR(ret = read(p_dev->fd, &ev, sizeof(ev))); in uhid_read_event() 102 switch (ev.type) { in uhid_read_event() 120 if (ret < (ssize_t)(sizeof(ev.type) + sizeof(ev.u.output))) { in uhid_read_event() 122 __func__, ret, sizeof(ev.type) + sizeof(ev.u.output)); in uhid_read_event() [all …]
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/ |
D | IpConnectivityEventBuilderTest.java | 66 ConnectivityMetricsEvent ev = describeIpEvent( in testLinkLayerInferrence() local 84 verifySerialization(want, ev); in testLinkLayerInferrence() 86 ev.netId = 123; in testLinkLayerInferrence() 87 ev.transports = 3; // transports have priority for inferrence of link layer in testLinkLayerInferrence() 88 ev.ifname = "wlan0"; in testLinkLayerInferrence() 103 verifySerialization(want, ev); in testLinkLayerInferrence() 105 ev.transports = 1; in testLinkLayerInferrence() 106 ev.ifname = null; in testLinkLayerInferrence() 121 verifySerialization(want, ev); in testLinkLayerInferrence() 123 ev.transports = 0; in testLinkLayerInferrence() [all …]
|
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/inputconsumers/ |
D | OtherActivityInputConsumer.java | 181 private void forceCancelGesture(MotionEvent ev) { in forceCancelGesture() argument 182 int action = ev.getAction(); in forceCancelGesture() 183 ev.setAction(ACTION_CANCEL); in forceCancelGesture() 184 finishTouchTracking(ev); in forceCancelGesture() 185 ev.setAction(action); in forceCancelGesture() 189 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 199 int action = ev.getAction(); in onMotionEvent() 200 ev.setAction(ACTION_MOVE_ALLOW_EASY_FLING); in onMotionEvent() 201 mRecentsViewDispatcher.dispatchEvent(ev); in onMotionEvent() 202 ev.setAction(action); in onMotionEvent() [all …]
|
D | AccessibilityInputConsumer.java | 76 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 78 mVelocityTracker.addMovement(ev); in onMotionEvent() 81 switch (ev.getActionMasked()) { in onMotionEvent() 87 int pointerIndex = ev.getActionIndex(); in onMotionEvent() 88 int pointerId = ev.getPointerId(pointerIndex); in onMotionEvent() 92 mTotalY += (ev.getY(pointerIndex) - mDownY); in onMotionEvent() 93 mDownY = ev.getY(newPointerIdx); in onMotionEvent() 94 mActivePointerId = ev.getPointerId(newPointerIdx); in onMotionEvent() 101 int pointerIndex = ev.getActionIndex(); in onMotionEvent() 103 .isInSwipeUpTouchRegion(ev, pointerIndex) in onMotionEvent() [all …]
|
D | TaskbarStashInputConsumer.java | 103 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 104 mLongPressDetector.onTouchEvent(ev); in onMotionEvent() 106 mDelegate.onMotionEvent(ev); in onMotionEvent() 109 final float x = ev.getRawX(); in onMotionEvent() 110 final float y = ev.getRawY(); in onMotionEvent() 111 switch (ev.getAction()) { in onMotionEvent() 113 mActivePointerId = ev.getPointerId(0); in onMotionEvent() 114 mDownPos.set(ev.getX(), ev.getY()); in onMotionEvent() 135 int ptrIdx = ev.getActionIndex(); in onMotionEvent() 136 int ptrId = ev.getPointerId(ptrIdx); in onMotionEvent() [all …]
|
D | OverviewInputConsumer.java | 77 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 78 int flags = ev.getEdgeFlags(); in onMotionEvent() 80 ev.setEdgeFlags(flags | Utilities.EDGE_NAV_BAR); in onMotionEvent() 82 ev.offsetLocation(-mLocationOnScreen[0], -mLocationOnScreen[1]); in onMotionEvent() 83 boolean handled = mTarget.proxyTouchEvent(ev, mStartingInActivityBounds); in onMotionEvent() 84 ev.offsetLocation(mLocationOnScreen[0], mLocationOnScreen[1]); in onMotionEvent() 85 ev.setEdgeFlags(flags); in onMotionEvent() 101 public void onHoverEvent(MotionEvent ev) { in onHoverEvent() argument 102 mActivity.dispatchGenericMotionEvent(ev); in onHoverEvent() 106 public void onKeyEvent(KeyEvent ev) { in onKeyEvent() argument [all …]
|
D | AssistantInputConsumer.java | 114 ? ev -> { } in AssistantInputConsumer() 124 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 126 switch (ev.getActionMasked()) { in onMotionEvent() 128 mActivePointerId = ev.getPointerId(0); in onMotionEvent() 129 mDownPos.set(ev.getX(), ev.getY()); in onMotionEvent() 141 int ptrIdx = ev.getActionIndex(); in onMotionEvent() 142 int ptrId = ev.getPointerId(ptrIdx); in onMotionEvent() 146 ev.getX(newPointerIdx) - (mLastPos.x - mDownPos.x), in onMotionEvent() 147 ev.getY(newPointerIdx) - (mLastPos.y - mDownPos.y)); in onMotionEvent() 148 mLastPos.set(ev.getX(newPointerIdx), ev.getY(newPointerIdx)); in onMotionEvent() [all …]
|
D | DeviceLockedInputConsumer.java | 141 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 145 mVelocityTracker.addMovement(ev); in onMotionEvent() 147 float x = ev.getX(); in onMotionEvent() 148 float y = ev.getY(); in onMotionEvent() 149 switch (ev.getAction()) { in onMotionEvent() 156 int ptrIdx = ev.getActionIndex(); in onMotionEvent() 157 if (!mDeviceState.getRotationTouchHelper().isInSwipeUpTouchRegion(ev, ptrIdx)) { in onMotionEvent() 158 int action = ev.getAction(); in onMotionEvent() 159 ev.setAction(ACTION_CANCEL); in onMotionEvent() 160 finishTouchTracking(ev); in onMotionEvent() [all …]
|
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/ |
D | StatusBarTouchController.java | 76 private void dispatchTouchEvent(MotionEvent ev) { in dispatchTouchEvent() argument 78 mLastAction = ev.getActionMasked(); in dispatchTouchEvent() 79 mSystemUiProxy.onStatusBarMotionEvent(ev); in dispatchTouchEvent() 84 public final boolean onControllerInterceptTouchEvent(MotionEvent ev) { in onControllerInterceptTouchEvent() argument 85 int action = ev.getActionMasked(); in onControllerInterceptTouchEvent() 86 int idx = ev.getActionIndex(); in onControllerInterceptTouchEvent() 87 int pid = ev.getPointerId(idx); in onControllerInterceptTouchEvent() 89 mCanIntercept = canInterceptTouch(ev); in onControllerInterceptTouchEvent() 93 mDownEvents.put(pid, new PointF(ev.getX(), ev.getY())); in onControllerInterceptTouchEvent() 94 } else if (ev.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN) { in onControllerInterceptTouchEvent() [all …]
|
/packages/apps/Launcher3/tests/src/com/android/launcher3/util/ |
D | TouchUtilTest.kt | 34 val ev = MotionEvent.obtain(200, 300, MotionEvent.ACTION_MOVE, 1.0f, 0.0f, 0) in isMouseRightClickDownOrMove_onMouseRightButton_returnsTrue() constant 35 ev.source = InputDevice.SOURCE_MOUSE in isMouseRightClickDownOrMove_onMouseRightButton_returnsTrue() 36 ev.buttonState = MotionEvent.BUTTON_SECONDARY in isMouseRightClickDownOrMove_onMouseRightButton_returnsTrue() 38 assertThat(TouchUtil.isMouseRightClickDownOrMove(ev)).isTrue() in isMouseRightClickDownOrMove_onMouseRightButton_returnsTrue() 43 val ev = MotionEvent.obtain(200, 300, MotionEvent.ACTION_MOVE, 1.0f, 0.0f, 0) in isMouseRightClickDownOrMove_onMouseLeftButton_returnsFalse() constant 44 ev.source = InputDevice.SOURCE_MOUSE in isMouseRightClickDownOrMove_onMouseLeftButton_returnsFalse() 45 ev.buttonState = MotionEvent.BUTTON_PRIMARY in isMouseRightClickDownOrMove_onMouseLeftButton_returnsFalse() 47 assertThat(TouchUtil.isMouseRightClickDownOrMove(ev)).isFalse() in isMouseRightClickDownOrMove_onMouseLeftButton_returnsFalse() 52 val ev = MotionEvent.obtain(200, 300, MotionEvent.ACTION_MOVE, 1.0f, 0.0f, 0) in isMouseRightClickDownOrMove_onMouseTertiaryButton_returnsFalse() constant 53 ev.source = InputDevice.SOURCE_MOUSE in isMouseRightClickDownOrMove_onMouseTertiaryButton_returnsFalse() [all …]
|
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/ |
D | PhotoTouchListener.java | 67 private float getAngle(View target, MotionEvent ev) { in getAngle() argument 69 int a = ev.findPointerIndex(mA); in getAngle() 70 int b = ev.findPointerIndex(mB); in getAngle() 122 public boolean onTouch(View target, MotionEvent ev) { in onTouch() argument 123 final int action = ev.getActionMasked(); in onTouch() 126 for(int i = 0; i < 10 && i < ev.getPointerCount(); i++) { in onTouch() 127 pts[i*2] = ev.getX(i); in onTouch() 128 pts[i*2 + 1] = ev.getY(i); in onTouch() 135 mInitialTouchTime = ev.getEventTime(); in onTouch() 136 mA = ev.getPointerId(ev.getActionIndex()); in onTouch() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/views/ |
D | BaseDragLayer.java | 135 public boolean isEventOverView(View view, MotionEvent ev) { in isEventOverView() argument 137 return mHitRect.contains((int) ev.getX(), (int) ev.getY()); in isEventOverView() 144 public boolean isEventOverView(View view, MotionEvent ev, View evView) { in isEventOverView() argument 145 int[] xy = new int[] {(int) ev.getX(), (int) ev.getY()}; in isEventOverView() 152 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 153 int action = ev.getAction(); in onInterceptTouchEvent() 163 return findActiveController(ev); in onInterceptTouchEvent() 166 private boolean isEventInLauncher(MotionEvent ev) { in isEventInLauncher() argument 167 final float x = ev.getX(); in isEventInLauncher() 168 final float y = ev.getY(); in isEventInLauncher() [all …]
|
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/interaction/ |
D | EdgeBackGestureHandler.java | 171 private void cancelGesture(MotionEvent ev) { in cancelGesture() argument 174 MotionEvent cancelEv = MotionEvent.obtain(ev); in cancelGesture() 180 private void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 181 int action = ev.getActionMasked(); in onMotionEvent() 183 boolean isOnLeftEdge = ev.getX() <= mEdgeWidth + mLeftInset; in onMotionEvent() 185 mAllowGesture = isWithinTouchRegion((int) ev.getX(), (int) ev.getY()); in onMotionEvent() 186 mDownPoint.set(ev.getX(), ev.getY()); in onMotionEvent() 189 mEdgeBackPanel.onMotionEvent(ev); in onMotionEvent() 196 cancelGesture(ev); in onMotionEvent() 199 if ((ev.getEventTime() - ev.getDownTime()) > mLongPressTimeout) { in onMotionEvent() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/dragndrop/ |
D | DragDriver.java | 48 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 55 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 96 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 176 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 177 mSecondaryEventConsumer.accept(ev); in onTouchEvent() 178 final int action = ev.getAction(); in onTouchEvent() 182 mEventListener.onDriverDragMove(mDragController.getX(ev), in onTouchEvent() 183 mDragController.getY(ev)); in onTouchEvent() 186 mEventListener.onDriverDragMove(mDragController.getX(ev), in onTouchEvent() 187 mDragController.getY(ev)); in onTouchEvent() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/touch/ |
D | BaseSwipeDetector.java | 133 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 134 int actionMasked = ev.getActionMasked(); in onTouchEvent() 141 mVelocityTracker.addMovement(ev); in onTouchEvent() 145 mActivePointerId = ev.getPointerId(0); in onTouchEvent() 146 mDownPos.set(ev.getX(), ev.getY()); in onTouchEvent() 157 int ptrIdx = ev.getActionIndex(); in onTouchEvent() 158 int ptrId = ev.getPointerId(ptrIdx); in onTouchEvent() 162 ev.getX(newPointerIdx) - (mLastPos.x - mDownPos.x), in onTouchEvent() 163 ev.getY(newPointerIdx) - (mLastPos.y - mDownPos.y)); in onTouchEvent() 164 mLastPos.set(ev.getX(newPointerIdx), ev.getY(newPointerIdx)); in onTouchEvent() [all …]
|
D | WorkspaceTouchListener.java | 86 public boolean onTouch(View view, MotionEvent ev) { in onTouch() argument 87 mGestureDetector.onTouchEvent(ev); in onTouch() 89 int action = ev.getActionMasked(); in onTouch() 103 handleLongPress = mTempRect.contains((int) ev.getX(), (int) ev.getY()); in onTouch() 108 mTouchDownPoint.set(ev.getX(), ev.getY()); in onTouch() 110 if (TouchUtil.isMouseRightClickDownOrMove(ev)) { in onTouch() 116 mWorkspace.onTouchEvent(ev); in onTouch() 123 ev.setAction(ACTION_CANCEL); in onTouch() 124 mWorkspace.onTouchEvent(ev); in onTouch() 126 ev.setAction(action); in onTouch() [all …]
|
/packages/apps/DeskClock/src/com/android/deskclock/ |
D | VerticalViewPager.kt | 52 override fun onInterceptTouchEvent(ev: MotionEvent): Boolean { in onInterceptTouchEvent() 53 val toIntercept: Boolean = super.onInterceptTouchEvent(flipXY(ev)) in onInterceptTouchEvent() 55 flipXY(ev) in onInterceptTouchEvent() 59 override fun onTouchEvent(ev: MotionEvent): Boolean { in onTouchEvent() 60 val toHandle: Boolean = super.onTouchEvent(flipXY(ev)) in onTouchEvent() 62 flipXY(ev) in onTouchEvent() 66 private fun flipXY(ev: MotionEvent): MotionEvent { in flipXY() 70 val x = ev.y / height * width in flipXY() 71 val y = ev.x / width * height in flipXY() 73 ev.setLocation(x, y) in flipXY() [all …]
|
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/ |
D | InputConsumerProxy.java | 72 private boolean onInputConsumerEvent(InputEvent ev) { in onInputConsumerEvent() argument 73 if (ev instanceof MotionEvent) { in onInputConsumerEvent() 74 MotionEvent event = (MotionEvent) ev; in onInputConsumerEvent() 84 } else if (ev instanceof KeyEvent) { in onInputConsumerEvent() 86 mInputConsumer.onKeyEvent((KeyEvent) ev); in onInputConsumerEvent() 92 private boolean onInputConsumerMotionEvent(MotionEvent ev) { in onInputConsumerMotionEvent() argument 93 int action = ev.getAction(); in onInputConsumerMotionEvent() 117 SimpleOrientationTouchTransformer.INSTANCE.get(mContext).transform(ev, in onInputConsumerMotionEvent() 119 mInputConsumer.onMotionEvent(ev); in onInputConsumerMotionEvent() 125 private void onInputConsumerHoverEvent(MotionEvent ev) { in onInputConsumerHoverEvent() argument [all …]
|
D | TriggerSwipeUpTouchTracker.java | 82 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 87 mVelocityTracker.addMovement(ev); in onMotionEvent() 88 switch (ev.getActionMasked()) { in onMotionEvent() 90 mDownPos.set(ev.getX(), ev.getY()); in onMotionEvent() 95 float displacementX = ev.getX() - mDownPos.x; in onMotionEvent() 96 float displacementY = ev.getY() - mDownPos.y; in onMotionEvent() 120 onGestureEnd(ev); in onMotionEvent() 134 private void onGestureEnd(MotionEvent ev) { in onGestureEnd() argument 149 float displacementX = mDisableHorizontalSwipe ? 0 : (ev.getX() - mDownPos.x); in onGestureEnd() 150 float displacementY = ev.getY() - mDownPos.y; in onGestureEnd()
|
/packages/apps/Camera2/src/com/android/camera/ui/ |
D | ModeListView.java | 197 public boolean shouldHandleTouchEvent(MotionEvent ev) { in shouldHandleTouchEvent() argument 209 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 349 public boolean shouldHandleTouchEvent(MotionEvent ev) { in shouldHandleTouchEvent() argument 354 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 355 if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) { in onTouchEvent() 356 mFocusItem = getFocusItem(ev.getX(), ev.getY()); in onTouchEvent() 447 public boolean shouldHandleTouchEvent(MotionEvent ev) { in shouldHandleTouchEvent() argument 455 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 456 if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) { in onTouchEvent() 462 if (isTouchInsideList(ev)) { in onTouchEvent() [all …]
|
D | MainActivityLayout.java | 77 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 78 if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) { in onInterceptTouchEvent() 80 mDown = MotionEvent.obtain(ev); in onInterceptTouchEvent() 88 } else if (ev.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN) { in onInterceptTouchEvent() 97 if (ev.getEventTime() - ev.getDownTime() > SWIPE_TIME_OUT) { in onInterceptTouchEvent() 103 int deltaX = (int) (ev.getX() - mDown.getX()); in onInterceptTouchEvent() 104 int deltaY = (int) (ev.getY() - mDown.getY()); in onInterceptTouchEvent() 105 if (ev.getActionMasked() == MotionEvent.ACTION_MOVE in onInterceptTouchEvent() 125 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 128 return mTouchReceiver.dispatchTouchEvent(ev); in onTouchEvent()
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
D | PagedView.java | 529 AccessibilityEvent ev = in sendScrollAccessibilityEvent() local 531 ev.setScrollable(true); in sendScrollAccessibilityEvent() 532 ev.setScrollX(getScrollX()); in sendScrollAccessibilityEvent() 533 ev.setScrollY(getScrollY()); in sendScrollAccessibilityEvent() 534 mOrientationHandler.setMaxScroll(ev, mMaxScroll); in sendScrollAccessibilityEvent() 535 sendAccessibilityEventUnchecked(ev); in sendScrollAccessibilityEvent() 1030 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 1040 acquireVelocityTrackerAndAddMovement(ev); in onInterceptTouchEvent() 1047 final int action = ev.getAction(); in onInterceptTouchEvent() 1059 determineScrollingStart(ev); in onInterceptTouchEvent() [all …]
|
/packages/modules/IntentResolver/java/src/com/android/intentresolver/widget/ |
D | ResolverDrawerLayout.java | 323 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 324 final int action = ev.getActionMasked(); in onInterceptTouchEvent() 330 mVelocityTracker.addMovement(ev); in onInterceptTouchEvent() 334 final float x = ev.getX(); in onInterceptTouchEvent() 335 final float y = ev.getY(); in onInterceptTouchEvent() 343 final float x = ev.getX(); in onInterceptTouchEvent() 344 final float y = ev.getY(); in onInterceptTouchEvent() 348 mActivePointerId = ev.getPointerId(0); in onInterceptTouchEvent() 357 onSecondaryPointerUp(ev); in onInterceptTouchEvent() 391 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument [all …]
|
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/views/ |
D | AllAppsEduView.java | 120 private boolean shouldInterceptTouch(MotionEvent ev) { in shouldInterceptTouch() argument 121 if (ev.getAction() == MotionEvent.ACTION_DOWN) { in shouldInterceptTouch() 122 mCanInterceptTouch = (ev.getEdgeFlags() & EDGE_NAV_BAR) == 0; in shouldInterceptTouch() 128 public boolean onControllerTouchEvent(MotionEvent ev) { in onControllerTouchEvent() argument 129 if (shouldInterceptTouch(ev)) { in onControllerTouchEvent() 130 mTouchController.onControllerTouchEvent(ev); in onControllerTouchEvent() 131 updateAnimationOnTouchEvent(ev); in onControllerTouchEvent() 136 private void updateAnimationOnTouchEvent(MotionEvent ev) { in updateAnimationOnTouchEvent() argument 140 switch (ev.getActionMasked()) { in updateAnimationOnTouchEvent() 157 public boolean onControllerInterceptTouchEvent(MotionEvent ev) { in onControllerInterceptTouchEvent() argument [all …]
|
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/taskbar/ |
D | TaskbarStashViaTouchController.kt | 110 override fun onControllerInterceptTouchEvent(ev: MotionEvent): Boolean { in onControllerInterceptTouchEvent() 115 val screenCoordinatesEv = MotionEvent.obtain(ev) in onControllerInterceptTouchEvent() 116 screenCoordinatesEv.setLocation(ev.rawX, ev.rawY) in onControllerInterceptTouchEvent() 117 if (ev.action == MotionEvent.ACTION_OUTSIDE) { in onControllerInterceptTouchEvent() 120 swipeDownDetector.onTouchEvent(ev) in onControllerInterceptTouchEvent() 124 } else if (ev.action == MotionEvent.ACTION_DOWN) { in onControllerInterceptTouchEvent() 132 override fun onControllerTouchEvent(ev: MotionEvent) = swipeDownDetector.onTouchEvent(ev)
|