Home
last modified time | relevance | path

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

123456

/frameworks/base/tests/net/java/com/android/server/connectivity/
DIpConnectivityEventBuilderTest.java64 ConnectivityMetricsEvent ev = describeIpEvent( in testLinkLayerInferrence() local
82 verifySerialization(want, ev); in testLinkLayerInferrence()
84 ev.netId = 123; in testLinkLayerInferrence()
85 ev.transports = 3; // transports have priority for inferrence of link layer in testLinkLayerInferrence()
86 ev.ifname = "wlan0"; in testLinkLayerInferrence()
101 verifySerialization(want, ev); in testLinkLayerInferrence()
103 ev.transports = 1; in testLinkLayerInferrence()
104 ev.ifname = null; in testLinkLayerInferrence()
119 verifySerialization(want, ev); in testLinkLayerInferrence()
121 ev.transports = 0; in testLinkLayerInferrence()
[all …]
/frameworks/base/services/core/java/com/android/server/connectivity/
DDefaultNetworkMetrics.java71 for (DefaultNetworkEvent ev : mEventsLog.toArray()) { in listEvents()
72 printEvent(localTimeMs, pw, ev); in listEvents()
85 for (DefaultNetworkEvent ev : mEventsLog.toArray()) { in listEventsAsProto()
86 pw.print(IpConnectivityEventBuilder.toProto(ev)); in listEventsAsProto()
91 for (DefaultNetworkEvent ev : mEvents) { in flushEvents()
92 out.add(IpConnectivityEventBuilder.toProto(ev)); in flushEvents()
125 DefaultNetworkEvent ev = mCurrentDefaultNetwork; in logCurrentDefaultNetwork() local
126 ev.updateDuration(timeMs); in logCurrentDefaultNetwork()
127 ev.previousTransports = mLastTransports; in logCurrentDefaultNetwork()
131 fillLinkInfo(ev, oldNai); in logCurrentDefaultNetwork()
[all …]
DIpConnectivityEventBuilder.java84 public static IpConnectivityEvent toProto(ConnectivityMetricsEvent ev) { in toProto() argument
85 final IpConnectivityEvent out = buildEvent(ev.netId, ev.transports, ev.ifname); in toProto()
86 out.timeMs = ev.timestamp; in toProto()
87 if (!setEvent(out, ev.data)) { in toProto()
141 IpConnectivityLogClass.DefaultNetworkEvent ev = in toProto() local
143 ev.finalScore = in.finalScore; in toProto()
144 ev.initialScore = in.initialScore; in toProto()
145 ev.ipSupport = ipSupportOf(in); in toProto()
146 ev.defaultNetworkDurationMs = in.durationMs; in toProto()
147 ev.validationDurationMs = in.validatedMs; in toProto()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
DNearestTouchFrameTest.java66 MotionEvent ev = MotionEvent.obtain(0, 0, 0, in testNoActionOnLargeDevices() local
68 mNearestTouchFrame.onTouchEvent(ev); in testNoActionOnLargeDevices()
69 verify(left, never()).onTouchEvent(eq(ev)); in testNoActionOnLargeDevices()
70 ev.recycle(); in testNoActionOnLargeDevices()
83 MotionEvent ev = MotionEvent.obtain(0, 0, 0, in testInvisibleViews() local
85 mNearestTouchFrame.onTouchEvent(ev); in testInvisibleViews()
86 verify(left, never()).onTouchEvent(eq(ev)); in testInvisibleViews()
87 verify(right, never()).onTouchEvent(eq(ev)); in testInvisibleViews()
88 ev.recycle(); in testInvisibleViews()
103 MotionEvent ev = MotionEvent.obtain(0, 0, 0, in testNearestView_DetachedViewsExcluded() local
[all …]
/frameworks/base/cmds/hid/jni/
Dcom_android_commands_hid_Device.cpp114 struct uhid_event ev = {}; in open() local
115 ev.type = UHID_CREATE2; in open()
116 strlcpy(reinterpret_cast<char*>(ev.u.create2.name), name, sizeof(ev.u.create2.name)); in open()
117 memcpy(&ev.u.create2.rd_data, descriptor.data(), in open()
118 size * sizeof(ev.u.create2.rd_data[0])); in open()
119 ev.u.create2.rd_size = size; in open()
120 ev.u.create2.bus = BUS_BLUETOOTH; in open()
121 ev.u.create2.vendor = vid; in open()
122 ev.u.create2.product = pid; in open()
123 ev.u.create2.version = 0; in open()
[all …]
/frameworks/base/core/java/com/android/internal/widget/
DSwipeDismissLayout.java167 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
168 checkGesture((ev)); in onInterceptTouchEvent()
173 return super.onInterceptTouchEvent(ev); in onInterceptTouchEvent()
179 ev.offsetLocation(ev.getRawX() - ev.getX(), 0); in onInterceptTouchEvent()
181 switch (ev.getActionMasked()) { in onInterceptTouchEvent()
184 mDownX = ev.getRawX(); in onInterceptTouchEvent()
185 mDownY = ev.getRawY(); in onInterceptTouchEvent()
186 mActiveTouchId = ev.getPointerId(0); in onInterceptTouchEvent()
188 mVelocityTracker.addMovement(ev); in onInterceptTouchEvent()
192 int actionIndex = ev.getActionIndex(); in onInterceptTouchEvent()
[all …]
DLinearLayoutWithDefaultTouchRecepient.java55 public boolean dispatchTouchEvent(MotionEvent ev) { in dispatchTouchEvent() argument
57 return super.dispatchTouchEvent(ev); in dispatchTouchEvent()
60 if (super.dispatchTouchEvent(ev)) { in dispatchTouchEvent()
65 ev.setLocation(ev.getX() + mTempRect.left, ev.getY() + mTempRect.top); in dispatchTouchEvent()
66 return mDefaultTouchRecepient.dispatchTouchEvent(ev); in dispatchTouchEvent()
/frameworks/base/core/java/android/net/metrics/
DIpConnectivityLog.java87 public boolean log(@NonNull ConnectivityMetricsEvent ev) { in log() argument
94 if (ev.timestamp == 0) { in log()
95 ev.timestamp = System.currentTimeMillis(); in log()
98 int left = mService.logEvent(ev); in log()
114 ConnectivityMetricsEvent ev = makeEv(data); in log() local
115 ev.timestamp = timestamp; in log()
116 return log(ev); in log()
126 ConnectivityMetricsEvent ev = makeEv(data); in log() local
127 ev.ifname = ifname; in log()
128 return log(ev); in log()
[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/rs/tests/java_api/Balls/src/com/example/android/rs/balls/
DBallsView.java74 public boolean onTouchEvent(MotionEvent ev) in onTouchEvent() argument
76 int act = ev.getActionMasked(); in onTouchEvent()
77 if (act == ev.ACTION_UP) { in onTouchEvent()
78 mRender.newTouchPosition(0, 0, 0, ev.getPointerId(0)); in onTouchEvent()
82 int pointerIndex = ev.getActionIndex(); in onTouchEvent()
83 int pointerId = ev.getPointerId(pointerIndex); in onTouchEvent()
87 int count = ev.getHistorySize(); in onTouchEvent()
88 int pcount = ev.getPointerCount(); in onTouchEvent()
91 int id = ev.getPointerId(p); in onTouchEvent()
92 mRender.newTouchPosition(ev.getX(p), in onTouchEvent()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/
DPipTouchState.java86 public void onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
87 switch (ev.getActionMasked()) { in onTouchEvent()
95 addMovement(ev); in onTouchEvent()
97 mActivePointerId = ev.getPointerId(0); in onTouchEvent()
101 mLastTouch.set(ev.getRawX(), ev.getRawY()); in onTouchEvent()
105 mDownTouchTime = ev.getEventTime(); in onTouchEvent()
123 addMovement(ev); in onTouchEvent()
124 int pointerIndex = ev.findPointerIndex(mActivePointerId); in onTouchEvent()
130 float x = ev.getRawX(pointerIndex); in onTouchEvent()
131 float y = ev.getRawY(pointerIndex); in onTouchEvent()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/
DQSScrollLayout.java68 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
72 mSwipeDetector.onTouchEvent(ev); in onInterceptTouchEvent()
73 return super.onInterceptTouchEvent(ev) || mOverScrollHelper.isInOverScroll(); in onInterceptTouchEvent()
77 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
81 mSwipeDetector.onTouchEvent(ev); in onTouchEvent()
82 return super.onTouchEvent(ev); in onTouchEvent()
92 public boolean shouldIntercept(MotionEvent ev) { in shouldIntercept() argument
93 if (ev.getY() > (getBottom() - mFooterHeight)) { in shouldIntercept()
97 if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) { in shouldIntercept()
98 mLastMotionY = (int) ev.getY(); in shouldIntercept()
[all …]
/frameworks/opt/photoviewer/src/com/android/ex/photo/
DPhotoViewPager.java114 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
124 final int action = ev.getAction() & MotionEventCompat.ACTION_MASK; in onInterceptTouchEvent()
140 MotionEventCompat.findPointerIndex(ev, activePointerId); in onInterceptTouchEvent()
141 final float x = MotionEventCompat.getX(ev, pointerIndex); in onInterceptTouchEvent()
158 mLastMotionX = ev.getX(); in onInterceptTouchEvent()
161 mActivatedX = ev.getRawX(); in onInterceptTouchEvent()
162 mActivatedY = ev.getRawY(); in onInterceptTouchEvent()
163 mActivePointerId = MotionEventCompat.getPointerId(ev, 0); in onInterceptTouchEvent()
168 final int pointerIndex = MotionEventCompat.getActionIndex(ev); in onInterceptTouchEvent()
169 final int pointerId = MotionEventCompat.getPointerId(ev, pointerIndex); in onInterceptTouchEvent()
[all …]
/frameworks/base/core/java/android/view/
DGestureDetector.java513 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
515 mInputEventConsistencyVerifier.onTouchEvent(ev, 0); in onTouchEvent()
518 final int action = ev.getAction(); in onTouchEvent()
523 mCurrentMotionEvent = MotionEvent.obtain(ev); in onTouchEvent()
528 mVelocityTracker.addMovement(ev); in onTouchEvent()
532 final int skipIndex = pointerUp ? ev.getActionIndex() : -1; in onTouchEvent()
534 (ev.getFlags() & MotionEvent.FLAG_IS_GENERATED_GESTURE) != 0; in onTouchEvent()
538 final int count = ev.getPointerCount(); in onTouchEvent()
541 sumX += ev.getX(i); in onTouchEvent()
542 sumY += ev.getY(i); in onTouchEvent()
[all …]
/frameworks/base/libs/androidfw/
DDisplayEventDispatcher.cpp126 const DisplayEventReceiver::Event& ev = buf[i]; in processPendingEvents() local
127 switch (ev.header.type) { in processPendingEvents()
132 *outTimestamp = ev.header.timestamp; in processPendingEvents()
133 *outDisplayId = ev.header.displayId; in processPendingEvents()
134 *outCount = ev.vsync.count; in processPendingEvents()
137 dispatchHotplug(ev.header.timestamp, ev.header.displayId, ev.hotplug.connected); in processPendingEvents()
140 dispatchConfigChanged(ev.header.timestamp, ev.header.displayId, ev.config.configId); in processPendingEvents()
143 ALOGW("dispatcher %p ~ ignoring unknown event type %#x", this, ev.header.type); in processPendingEvents()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DObservableScrollView.java70 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
72 mLastX = ev.getX(); in onTouchEvent()
73 mLastY = ev.getY(); in onTouchEvent()
74 boolean result = super.onTouchEvent(ev); in onTouchEvent()
80 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
82 mLastX = ev.getX(); in onInterceptTouchEvent()
83 mLastY = ev.getY(); in onInterceptTouchEvent()
84 boolean result = super.onInterceptTouchEvent(ev); in onInterceptTouchEvent()
90 public boolean dispatchTouchEvent(MotionEvent ev) { in dispatchTouchEvent() argument
91 if (ev.getAction() == MotionEvent.ACTION_DOWN) { in dispatchTouchEvent()
[all …]
DEdgeBackGestureHandler.java320 private void onInputEvent(InputEvent ev) { in onInputEvent() argument
321 if (ev instanceof MotionEvent) { in onInputEvent()
322 onMotionEvent((MotionEvent) ev); in onInputEvent()
356 private void cancelGesture(MotionEvent ev) { in cancelGesture() argument
360 MotionEvent cancelEv = MotionEvent.obtain(ev); in cancelGesture()
366 private void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument
367 int action = ev.getActionMasked(); in onMotionEvent()
372 mIsOnLeftEdge = ev.getX() <= mEdgeWidth + mLeftInset; in onMotionEvent()
375 && isWithinTouchRegion((int) ev.getX(), (int) ev.getY()); in onMotionEvent()
381 mEdgePanel.handleTouch(ev); in onMotionEvent()
[all …]
/frameworks/base/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/
DTaskStackViewTouchHandler.java169 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
171 mInterceptedBySwipeHelper = isSwipingEnabled() && mSwipeHelper.onInterceptTouchEvent(ev); in onInterceptTouchEvent()
176 return handleTouchEvent(ev); in onInterceptTouchEvent()
180 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
182 if (mInterceptedBySwipeHelper && mSwipeHelper.onTouchEvent(ev)) { in onTouchEvent()
186 handleTouchEvent(ev); in onTouchEvent()
217 private boolean handleTouchEvent(MotionEvent ev) { in handleTouchEvent() argument
224 int action = ev.getAction(); in handleTouchEvent()
235 mDownX = (int) ev.getX(); in handleTouchEvent()
236 mDownY = (int) ev.getY(); in handleTouchEvent()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DSwipeHelper.java132 private float getPos(MotionEvent ev) { in getPos() argument
133 return mSwipeDirection == X ? ev.getX() : ev.getY(); in getPos()
136 private float getPerpendicularPos(MotionEvent ev) { in getPerpendicularPos() argument
137 return mSwipeDirection == X ? ev.getY() : ev.getX(); in getPerpendicularPos()
266 public boolean onInterceptTouchEvent(final MotionEvent ev) { in onInterceptTouchEvent() argument
270 mMenuRowIntercepting = nmr.onInterceptTouchEvent(mCurrView, ev); in onInterceptTouchEvent()
273 final int action = ev.getAction(); in onInterceptTouchEvent()
282 mCurrView = mCallback.getChildAtPosition(ev); in onInterceptTouchEvent()
285 onDownUpdate(mCurrView, ev); in onInterceptTouchEvent()
287 mVelocityTracker.addMovement(ev); in onInterceptTouchEvent()
[all …]
DExpandHelper.java261 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
265 trackVelocity(ev); in onInterceptTouchEvent()
266 final int action = ev.getAction(); in onInterceptTouchEvent()
273 mSGD.onTouchEvent(ev); in onInterceptTouchEvent()
284 mLastMotionY = ev.getRawY(); in onInterceptTouchEvent()
285 maybeRecycleVelocityTracker(ev); in onInterceptTouchEvent()
303 final float yDiff = ev.getRawY() - mInitialTouchY; in onInterceptTouchEvent()
304 final float xDiff = ev.getRawX() - mInitialTouchX; in onInterceptTouchEvent()
310 mLastMotionY = ev.getRawY(); in onInterceptTouchEvent()
311 mInitialTouchY = ev.getRawY(); in onInterceptTouchEvent()
[all …]
/frameworks/base/services/core/java/com/android/server/trust/
DTrustArchive.java119 Event ev = iter.next(); in dump() local
120 if (userId != UserHandle.USER_ALL && userId != ev.userId in dump()
121 && ev.userId != UserHandle.USER_ALL) { in dump()
126 writer.printf("#%-2d %s %s: ", count, formatElapsed(ev.elapsedTimestamp), in dump()
127 dumpType(ev.type)); in dump()
129 writer.print("user="); writer.print(ev.userId); writer.print(", "); in dump()
131 if (ev.agent != null) { in dump()
134 writer.print(ev.agent.flattenToShortString()); in dump()
136 writer.print(getSimpleName(ev.agent)); in dump()
139 switch (ev.type) { in dump()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/analytics/
DSensorLoggerSession.java125 private SensorEvent sensorEventToProto(android.hardware.SensorEvent ev, long sysTimeNanos) { in sensorEventToProto() argument
127 proto.type = ev.sensor.getType(); in sensorEventToProto()
129 proto.timestamp = ev.timestamp; in sensorEventToProto()
130 proto.values = ev.values.clone(); in sensorEventToProto()
134 private TouchEvent motionEventToProto(MotionEvent ev) { in motionEventToProto() argument
135 int count = ev.getPointerCount(); in motionEventToProto()
137 proto.timeOffsetNanos = ev.getEventTimeNano() - mStartSystemTimeNanos; in motionEventToProto()
138 proto.action = ev.getActionMasked(); in motionEventToProto()
139 proto.actionIndex = ev.getActionIndex(); in motionEventToProto()
143 p.x = ev.getX(i); in motionEventToProto()
[all …]
/frameworks/rs/tests/java_api/RsTest_16/src/com/android/rs/test/
DRSTestView.java82 public boolean onTouchEvent(MotionEvent ev) in onTouchEvent() argument
85 int act = ev.getAction(); in onTouchEvent()
86 if (act == ev.ACTION_DOWN) { in onTouchEvent()
87 mRender.onActionDown((int)ev.getX(), (int)ev.getY()); in onTouchEvent()
90 else if (act == ev.ACTION_MOVE) { in onTouchEvent()
91 mRender.onActionMove((int)ev.getX(), (int)ev.getY()); in onTouchEvent()
/frameworks/rs/tests/java_api/RsTest_14/src/com/android/rs/test/
DRSTestView.java82 public boolean onTouchEvent(MotionEvent ev) in onTouchEvent() argument
85 int act = ev.getAction(); in onTouchEvent()
86 if (act == ev.ACTION_DOWN) { in onTouchEvent()
87 mRender.onActionDown((int)ev.getX(), (int)ev.getY()); in onTouchEvent()
90 else if (act == ev.ACTION_MOVE) { in onTouchEvent()
91 mRender.onActionMove((int)ev.getX(), (int)ev.getY()); in onTouchEvent()
/frameworks/rs/tests/java_api/RsTest_11/src/com/android/rs/test/
DRSTestView.java82 public boolean onTouchEvent(MotionEvent ev) in onTouchEvent() argument
85 int act = ev.getAction(); in onTouchEvent()
86 if (act == ev.ACTION_DOWN) { in onTouchEvent()
87 mRender.onActionDown((int)ev.getX(), (int)ev.getY()); in onTouchEvent()
90 else if (act == ev.ACTION_MOVE) { in onTouchEvent()
91 mRender.onActionMove((int)ev.getX(), (int)ev.getY()); in onTouchEvent()

123456