Home
last modified time | relevance | path

Searched refs:ev (Results 1 – 25 of 219) sorted by relevance

123456789

/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/
DIpConnectivityEventBuilderTest.java62 ConnectivityMetricsEvent ev = describeIpEvent( in testLinkLayerInferrence() local
80 verifySerialization(want, ev); in testLinkLayerInferrence()
82 ev.netId = 123; in testLinkLayerInferrence()
83 ev.transports = 3; // transports have priority for inferrence of link layer in testLinkLayerInferrence()
84 ev.ifname = "wlan0"; in testLinkLayerInferrence()
99 verifySerialization(want, ev); in testLinkLayerInferrence()
101 ev.transports = 1; in testLinkLayerInferrence()
102 ev.ifname = null; in testLinkLayerInferrence()
117 verifySerialization(want, ev); in testLinkLayerInferrence()
119 ev.transports = 0; in testLinkLayerInferrence()
[all …]
/packages/modules/Bluetooth/system/btif/co/
Dbta_hh_co.cc128 static int uhid_write(int fd, const struct uhid_event* ev) { in uhid_write() argument
130 OSI_NO_INTR(ret = write(fd, ev, sizeof(*ev))); in uhid_write()
136 } else if (ret != (ssize_t)sizeof(*ev)) { in uhid_write()
137 log::error("Wrong size written to uhid: {} != {}", ret, sizeof(*ev)); in uhid_write()
148 struct uhid_event ev; in uhid_read_event() local
149 memset(&ev, 0, sizeof(ev)); in uhid_read_event()
152 OSI_NO_INTR(ret = read(p_uhid->fd, &ev, sizeof(ev))); in uhid_read_event()
162 switch (ev.type) { in uhid_read_event()
180 if (ret < (ssize_t)(sizeof(ev.type) + sizeof(ev.u.output))) { in uhid_read_event()
182 sizeof(ev.type) + sizeof(ev.u.output)); in uhid_read_event()
[all …]
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/inputconsumers/
DOtherActivityInputConsumer.java168 private void forceCancelGesture(MotionEvent ev) { in forceCancelGesture() argument
169 int action = ev.getAction(); in forceCancelGesture()
170 ev.setAction(ACTION_CANCEL); in forceCancelGesture()
171 finishTouchTracking(ev); in forceCancelGesture()
172 ev.setAction(action); in forceCancelGesture()
176 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument
186 int action = ev.getAction(); in onMotionEvent()
187 ev.setAction(ACTION_MOVE_ALLOW_EASY_FLING); in onMotionEvent()
188 mRecentsViewDispatcher.dispatchEvent(ev); in onMotionEvent()
189 ev.setAction(action); in onMotionEvent()
[all …]
DTaskbarUnstashInputConsumer.java139 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument
141 checkVelocityForTaskbarBackground(ev); in onMotionEvent()
144 boolean isStashedTaskbarHovered = isMouseEvent(ev) in onMotionEvent()
145 && isStashedTaskbarHovered((int) ev.getX(), (int) ev.getY()); in onMotionEvent()
147 if (!isTrackpadMotionEvent(ev)) { in onMotionEvent()
148 final float x = ev.getRawX(); in onMotionEvent()
149 final float y = ev.getRawY(); in onMotionEvent()
150 switch (ev.getAction()) { in onMotionEvent()
152 mActivePointerId = ev.getPointerId(0); in onMotionEvent()
153 mDownPos.set(ev.getX(), ev.getY()); in onMotionEvent()
[all …]
DAccessibilityInputConsumer.java79 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument
81 mVelocityTracker.addMovement(ev); in onMotionEvent()
84 switch (ev.getActionMasked()) { in onMotionEvent()
90 int pointerIndex = ev.getActionIndex(); in onMotionEvent()
91 int pointerId = ev.getPointerId(pointerIndex); in onMotionEvent()
95 mTotalY += (ev.getY(pointerIndex) - mDownY); in onMotionEvent()
96 mDownY = ev.getY(newPointerIdx); in onMotionEvent()
97 mActivePointerId = ev.getPointerId(newPointerIdx); in onMotionEvent()
104 int pointerIndex = ev.getActionIndex(); in onMotionEvent()
105 if (mDeviceState.getRotationTouchHelper().isInSwipeUpTouchRegion(ev, in onMotionEvent()
[all …]
DTrackpadStatusBarInputConsumer.java52 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument
54 mDelegate.onMotionEvent(ev); in onMotionEvent()
56 switch (ev.getActionMasked()) { in onMotionEvent()
58 mDown.set(ev.getX(), ev.getY()); in onMotionEvent()
63 float displacementY = ev.getY() - mDown.y; in onMotionEvent()
67 setActive(ev); in onMotionEvent()
68 ev.setAction(ACTION_DOWN); in onMotionEvent()
69 dispatchTouchEvent(ev); in onMotionEvent()
76 dispatchTouchEvent(ev); in onMotionEvent()
80 private void dispatchTouchEvent(MotionEvent ev) { in dispatchTouchEvent() argument
[all …]
DOverviewInputConsumer.java83 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument
84 int flags = ev.getEdgeFlags(); in onMotionEvent()
86 ev.setEdgeFlags(flags | Utilities.EDGE_NAV_BAR); in onMotionEvent()
88 ev.offsetLocation(-mLocationOnScreen[0], -mLocationOnScreen[1]); in onMotionEvent()
91 handled = mTarget.proxyTouchEvent(ev, mStartingInActivityBounds); in onMotionEvent()
93 ev.offsetLocation(mLocationOnScreen[0], mLocationOnScreen[1]); in onMotionEvent()
94 ev.setEdgeFlags(flags); in onMotionEvent()
113 public void onHoverEvent(MotionEvent ev) { in onHoverEvent() argument
114 mContainer.dispatchGenericMotionEvent(ev); in onHoverEvent()
118 public void onKeyEvent(KeyEvent ev) { in onKeyEvent() argument
[all …]
DAssistantInputConsumer.java114 ? 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 …]
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/
DStatusBarTouchController.java79 private void dispatchTouchEvent(MotionEvent ev) { in dispatchTouchEvent() argument
81 mLastAction = ev.getActionMasked(); in dispatchTouchEvent()
82 mSystemUiProxy.onStatusBarTouchEvent(ev); in dispatchTouchEvent()
87 public final boolean onControllerInterceptTouchEvent(MotionEvent ev) { in onControllerInterceptTouchEvent() argument
88 int action = ev.getActionMasked(); in onControllerInterceptTouchEvent()
89 int idx = ev.getActionIndex(); in onControllerInterceptTouchEvent()
90 int pid = ev.getPointerId(idx); in onControllerInterceptTouchEvent()
92 mCanIntercept = canInterceptTouch(ev); in onControllerInterceptTouchEvent()
97 mDownEvents.put(pid, new PointF(ev.getX(), ev.getY())); in onControllerInterceptTouchEvent()
99 && isTrackpadScroll(ev); in onControllerInterceptTouchEvent()
[all …]
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/util/
DTouchUtilTest.kt34 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/
DPhotoTouchListener.java67 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/quickstep/src/com/android/quickstep/interaction/
DEdgeBackGestureHandler.java171 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/
DDragDriver.java48 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/views/
DBaseDragLayer.java136 public boolean isEventOverView(View view, MotionEvent ev) { in isEventOverView() argument
138 return mHitRect.contains((int) ev.getX(), (int) ev.getY()); in isEventOverView()
145 public boolean isEventOverView(View view, MotionEvent ev, View evView) { in isEventOverView() argument
146 int[] xy = new int[] {(int) ev.getX(), (int) ev.getY()}; in isEventOverView()
153 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
154 int action = ev.getAction(); in onInterceptTouchEvent()
164 return findActiveController(ev); in onInterceptTouchEvent()
167 protected boolean isEventWithinSystemGestureRegion(MotionEvent ev) { in isEventWithinSystemGestureRegion() argument
168 final float x = ev.getX(); in isEventWithinSystemGestureRegion()
169 final float y = ev.getY(); in isEventWithinSystemGestureRegion()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/touch/
DBaseSwipeDetector.java133 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 …]
DWorkspaceTouchListener.java88 public boolean onTouch(View view, MotionEvent ev) { in onTouch() argument
89 mGestureDetector.onTouchEvent(ev); in onTouch()
91 int action = ev.getActionMasked(); in onTouch()
105 handleLongPress = mTempRect.contains((int) ev.getX(), (int) ev.getY()); in onTouch()
110 mTouchDownPoint.set(ev.getX(), ev.getY()); in onTouch()
112 if (TouchUtil.isMouseRightClickDownOrMove(ev)) { in onTouch()
118 mWorkspace.onTouchEvent(ev); in onTouch()
125 ev.setAction(ACTION_CANCEL); in onTouch()
126 mWorkspace.onTouchEvent(ev); in onTouch()
128 ev.setAction(action); in onTouch()
[all …]
/packages/apps/DeskClock/src/com/android/deskclock/
DVerticalViewPager.kt52 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/src/com/android/launcher3/util/
DOverlayEdgeEffect.java64 public float onPullDistance(float deltaDistance, float displacement, MotionEvent ev) { in onPullDistance() argument
67 int originalAction = ev.getAction(); in onPullDistance()
68 ev.setAction(MotionEvent.ACTION_DOWN); in onPullDistance()
69 mOverlay.onOverlayMotionEvent(ev, 0); in onPullDistance()
70 ev.setAction(originalAction); in onPullDistance()
73 mOverlay.onOverlayMotionEvent(ev, mDistance); in onPullDistance()
103 public void onRelease(MotionEvent ev) { in onRelease() argument
105 int originalAction = ev.getAction(); in onRelease()
106 ev.setAction(MotionEvent.ACTION_UP); in onRelease()
107 mOverlay.onOverlayMotionEvent(ev, mDistance); in onRelease()
[all …]
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/
DInputConsumerProxy.java77 private boolean onInputConsumerEvent(InputEvent ev) { in onInputConsumerEvent() argument
78 if (ev instanceof MotionEvent) { in onInputConsumerEvent()
79 MotionEvent event = (MotionEvent) ev; in onInputConsumerEvent()
89 } else if (ev instanceof KeyEvent) { in onInputConsumerEvent()
91 mInputConsumer.onKeyEvent((KeyEvent) ev); in onInputConsumerEvent()
97 private boolean onInputConsumerMotionEvent(MotionEvent ev) { in onInputConsumerMotionEvent() argument
98 int action = ev.getAction(); in onInputConsumerMotionEvent()
122 SimpleOrientationTouchTransformer.INSTANCE.get(mContext).transform(ev, in onInputConsumerMotionEvent()
124 mInputConsumer.onMotionEvent(ev); in onInputConsumerMotionEvent()
130 private void onInputConsumerHoverEvent(MotionEvent ev) { in onInputConsumerHoverEvent() argument
[all …]
DTriggerSwipeUpTouchTracker.java83 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument
88 mVelocityTracker.addMovement(ev); in onMotionEvent()
89 switch (ev.getActionMasked()) { in onMotionEvent()
91 mDownPos.set(ev.getX(), ev.getY()); in onMotionEvent()
96 float displacementX = ev.getX() - mDownPos.x; in onMotionEvent()
97 float displacementY = ev.getY() - mDownPos.y; in onMotionEvent()
120 onGestureEnd(ev); in onMotionEvent()
135 private void onGestureEnd(MotionEvent ev) { in onGestureEnd() argument
150 float displacementX = mDisableHorizontalSwipe ? 0 : (ev.getX() - mDownPos.x); in onGestureEnd()
151 float displacementY = ev.getY() - mDownPos.y; in onGestureEnd()
/packages/modules/Bluetooth/floss/hcidoc/src/groups/
Dinformational.rs703 PacketChild::HciEvent(ev) => match ev.specialize() { in process()
704 EventChild::ConnectionComplete(ev) => { in process()
706 &ev.get_bd_addr(), in process()
707 ev.get_connection_handle(), in process()
712 if ev.get_status() != ErrorCode::Success { in process()
713 self.report_connection_end(ev.get_connection_handle(), packet.ts); in process()
717 EventChild::SynchronousConnectionComplete(ev) => { in process()
719 &ev.get_bd_addr(), in process()
720 ev.get_connection_handle(), in process()
724 if ev.get_status() != ErrorCode::Success { in process()
[all …]
Dconnections.rs731 PacketChild::HciEvent(ev) => match ev.specialize() { in process()
964 PacketChild::HciEvent(ev) => match ev.specialize() { in process()
965 EventChild::ConnectionComplete(ev) => { in process()
966 if ev.get_status() == ErrorCode::Success { in process()
967 self.handles.insert(ev.get_connection_handle(), ev.get_bd_addr()); in process()
970 EventChild::LinkKeyRequest(ev) => { in process()
971 self.process_request_link_key(ev.get_bd_addr()); in process()
973 EventChild::SimplePairingComplete(ev) => { in process()
974 self.process_address_auth(ev.get_status(), ev.get_bd_addr(), &packet); in process()
976 EventChild::AuthenticationComplete(ev) => { in process()
[all …]
/packages/modules/Bluetooth/system/gd/hal/
Dmgmt.cc94 struct mgmt_pkt ev; in get_vs_opcode() local
95 ev.opcode = MGMT_OP_GET_VS_OPCODE; in get_vs_opcode()
96 ev.index = HCI_DEV_NONE; in get_vs_opcode()
97 ev.len = sizeof(struct mgmt_cp_get_vs_opcode); in get_vs_opcode()
99 struct mgmt_cp_get_vs_opcode* cp = reinterpret_cast<struct mgmt_cp_get_vs_opcode*>(ev.data); in get_vs_opcode()
111 RETRY_ON_INTR(ret = write(fd, &ev, MGMT_PKT_HDR_SIZE + ev.len)); in get_vs_opcode()
113 log::error("Failed to call MGMT opcode 0x{:04x}, errno {}", ev.opcode, -errno); in get_vs_opcode()
125 "Skip because mgmt socket is not writable: ev.opcode 0x{:04x} ret {}", ev.opcode, ret); in get_vs_opcode()
148 if (cc->opcode == ev.opcode && cc->status == 0) { in get_vs_opcode()
163 log::error("Timeout while waiting for response of calling MGMT opcode: 0x{:04x}", ev.opcode); in get_vs_opcode()
/packages/apps/Launcher3/src/com/android/launcher3/
DPagedView.java542 AccessibilityEvent ev = in sendScrollAccessibilityEvent() local
544 ev.setScrollable(true); in sendScrollAccessibilityEvent()
545 ev.setScrollX(getScrollX()); in sendScrollAccessibilityEvent()
546 ev.setScrollY(getScrollY()); in sendScrollAccessibilityEvent()
547 mOrientationHandler.setMaxScroll(ev, mMaxScroll); in sendScrollAccessibilityEvent()
548 sendAccessibilityEventUnchecked(ev); in sendScrollAccessibilityEvent()
1050 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
1060 acquireVelocityTrackerAndAddMovement(ev); in onInterceptTouchEvent()
1067 final int action = ev.getAction(); in onInterceptTouchEvent()
1079 determineScrollingStart(ev); in onInterceptTouchEvent()
[all …]
/packages/modules/Bluetooth/system/stack/btm/
Dbtm_sco_hfp_hal_linux.cc160 struct mgmt_pkt ev; in mgmt_get_codec_capabilities() local
161 ev.opcode = MGMT_OP_GET_SCO_CODEC_CAPABILITIES; in mgmt_get_codec_capabilities()
162 ev.index = HCI_DEV_NONE; in mgmt_get_codec_capabilities()
163 ev.len = sizeof(struct mgmt_cp_get_codec_capabilities); in mgmt_get_codec_capabilities()
166 reinterpret_cast<struct mgmt_cp_get_codec_capabilities*>(ev.data); in mgmt_get_codec_capabilities()
178 RETRY_ON_INTR(ret = write(fd, &ev, MGMT_PKT_HDR_SIZE + ev.len)); in mgmt_get_codec_capabilities()
202 RETRY_ON_INTR(ret = read(fd, &ev, sizeof(ev))); in mgmt_get_codec_capabilities()
208 if (ev.opcode == MGMT_EV_COMMAND_COMPLETE) { in mgmt_get_codec_capabilities()
210 reinterpret_cast<struct mgmt_ev_cmd_complete*>(ev.data); in mgmt_get_codec_capabilities()
243 struct mgmt_pkt ev; in mgmt_notify_sco_connection_change() local
[all …]

123456789