Home
last modified time | relevance | path

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

12345678910

/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/
DDragDetector.java61 boolean onMotionEvent(MotionEvent ev) { in onMotionEvent() argument
62 return onMotionEvent(null /* view */, ev); in onMotionEvent()
71 boolean onMotionEvent(View v, MotionEvent ev) { in onMotionEvent() argument
73 (ev.getSource() & SOURCE_TOUCHSCREEN) == SOURCE_TOUCHSCREEN; in onMotionEvent()
77 return mEventHandler.handleMotionEvent(v, ev); in onMotionEvent()
79 switch (ev.getActionMasked()) { in onMotionEvent()
81 mDragPointerId = ev.getPointerId(0); in onMotionEvent()
82 float rawX = ev.getRawX(0); in onMotionEvent()
83 float rawY = ev.getRawY(0); in onMotionEvent()
85 mResultOfDownAction = mEventHandler.handleMotionEvent(v, ev); in onMotionEvent()
[all …]
/frameworks/base/services/core/java/com/android/server/connectivity/
DDefaultNetworkMetrics.java73 for (DefaultNetworkEvent ev : mEventsLog.toArray()) { in listEvents()
74 printEvent(localTimeMs, pw, ev); in listEvents()
91 for (DefaultNetworkEvent ev : mEventsLog.toArray()) { in listEventsAsProto()
92 list.add(IpConnectivityEventBuilder.toProto(ev)); in listEventsAsProto()
98 for (DefaultNetworkEvent ev : mEvents) { in flushEvents()
99 out.add(IpConnectivityEventBuilder.toProto(ev)); in flushEvents()
140 DefaultNetworkEvent ev = mCurrentDefaultNetwork; in logCurrentDefaultNetwork() local
141 ev.updateDuration(timeMs); in logCurrentDefaultNetwork()
142 ev.previousTransports = mLastTransports; in logCurrentDefaultNetwork()
146 fillLinkInfo(ev, network, lp, nc); in logCurrentDefaultNetwork()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/navigationbar/buttons/
DNearestTouchFrameTest.java88 MotionEvent ev = MotionEvent.obtain(0, 0, 0, in testNoActionOnLargeDevices() local
90 mNearestTouchFrame.onTouchEvent(ev); in testNoActionOnLargeDevices()
91 verify(left, never()).onTouchEvent(eq(ev)); in testNoActionOnLargeDevices()
92 ev.recycle(); in testNoActionOnLargeDevices()
105 MotionEvent ev = MotionEvent.obtain(0, 0, 0, in testInvisibleViews() local
107 mNearestTouchFrame.onTouchEvent(ev); in testInvisibleViews()
108 verify(left, never()).onTouchEvent(eq(ev)); in testInvisibleViews()
109 verify(right, never()).onTouchEvent(eq(ev)); in testInvisibleViews()
110 ev.recycle(); in testInvisibleViews()
125 MotionEvent ev = MotionEvent.obtain(0, 0, 0, in testNearestView_DetachedViewsExcluded() local
[all …]
/frameworks/base/cmds/hid/jni/
Dcom_android_commands_hid_Device.cpp153 struct uhid_event ev = {}; in open() local
154 ev.type = UHID_CREATE2; in open()
155 strlcpy(reinterpret_cast<char*>(ev.u.create2.name), name, sizeof(ev.u.create2.name)); in open()
156 strlcpy(reinterpret_cast<char*>(ev.u.create2.uniq), uniq, sizeof(ev.u.create2.uniq)); in open()
157 memcpy(&ev.u.create2.rd_data, descriptor.data(), size * sizeof(ev.u.create2.rd_data[0])); in open()
158 ev.u.create2.rd_size = size; in open()
159 ev.u.create2.bus = bus; in open()
160 ev.u.create2.vendor = vid; in open()
161 ev.u.create2.product = pid; in open()
162 ev.u.create2.version = 0; in open()
[all …]
/frameworks/base/core/java/com/android/internal/policy/
DWearGestureInterceptionDetector.java77 private int getIndexForValidPointer(MotionEvent ev) { in getIndexForValidPointer() argument
78 int pointerIndex = ev.findPointerIndex(mActivePointerId); in getIndexForValidPointer()
88 private void updateSwiping(MotionEvent ev) { in updateSwiping() argument
92 float deltaX = ev.getRawX() - mDownX; in updateSwiping()
93 float deltaY = ev.getRawY() - mDownY; in updateSwiping()
100 private void updateDiscardIntercept(MotionEvent ev, int pointerIndex) {
108 final boolean checkLeft = mDownX < ev.getRawX();
109 final float x = ev.getX(pointerIndex);
110 final float y = ev.getY(pointerIndex);
130 public boolean onInterceptTouchEvent(MotionEvent ev) {
[all …]
/frameworks/native/libs/gui/
DDisplayEventDispatcher.cpp168 const DisplayEventReceiver::Event& ev = buf[i]; in processPendingEvents() local
169 switch (ev.header.type) { in processPendingEvents()
174 *outTimestamp = ev.header.timestamp; in processPendingEvents()
175 *outDisplayId = ev.header.displayId; in processPendingEvents()
176 *outCount = ev.vsync.count; in processPendingEvents()
177 *outVsyncEventData = ev.vsync.vsyncData; in processPendingEvents()
181 const auto frameInterval = ev.vsync.vsyncData.frameInterval; in processPendingEvents()
187 if (ev.hotplug.connectionError == 0) { in processPendingEvents()
188 dispatchHotplug(ev.header.timestamp, ev.header.displayId, in processPendingEvents()
189 ev.hotplug.connected); in processPendingEvents()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/shade/
DNotificationShadeWindowViewController.java266 private Boolean logDownDispatch(MotionEvent ev, String msg, Boolean result) { in logDownDispatch() argument
267 if (ev.getAction() == MotionEvent.ACTION_DOWN) { in logDownDispatch()
268 mShadeLogger.logShadeWindowDispatch(ev, msg, result); in logDownDispatch()
313 public Boolean handleDispatchTouchEvent(MotionEvent ev) { in setupExpandedStatusBar()
315 return logDownDispatch(ev, in setupExpandedStatusBar()
318 boolean isDown = ev.getActionMasked() == MotionEvent.ACTION_DOWN; in setupExpandedStatusBar()
319 boolean isUp = ev.getActionMasked() == MotionEvent.ACTION_UP; in setupExpandedStatusBar()
320 boolean isCancel = ev.getActionMasked() == MotionEvent.ACTION_CANCEL; in setupExpandedStatusBar()
330 return logDownDispatch(ev, "touch ignored by CS", false); in setupExpandedStatusBar()
336 mDownEvent = ev; in setupExpandedStatusBar()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/gesture/
DSwipeUpGestureHandler.kt52 override fun onInputEvent(ev: InputEvent) { in onInputEvent()
53 if (ev !is MotionEvent) { in onInputEvent()
57 when (ev.actionMasked) { in onInputEvent()
60 startOfGestureIsWithinBounds(ev) in onInputEvent()
62 logger.logGestureDetectionStarted(loggerTag, ev.y.toInt()) in onInputEvent()
63 startY = ev.y in onInputEvent()
64 startTime = ev.eventTime in onInputEvent()
76 ev.y < startY && in onInputEvent()
78 (startY - ev.y) >= swipeDistanceThreshold && in onInputEvent()
80 (ev.eventTime - startTime) < SWIPE_TIMEOUT_MS in onInputEvent()
[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/base/core/java/android/net/metrics/
DIpConnectivityLog.java94 public boolean log(@NonNull ConnectivityMetricsEvent ev) { in log() argument
98 if (ev.timestamp == 0) { in log()
99 ev.timestamp = System.currentTimeMillis(); in log()
102 int left = mService.logEvent(ev); in log()
118 ConnectivityMetricsEvent ev = makeEv(data); in log() local
119 ev.timestamp = timestamp; in log()
120 return log(ev); in log()
130 ConnectivityMetricsEvent ev = makeEv(data); in log() local
131 ev.ifname = ifname; in log()
132 return log(ev); in log()
[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/statusbar/window/
DStatusBarWindowView.java76 public boolean dispatchTouchEvent(MotionEvent ev) { in dispatchTouchEvent() argument
77 if (ev.getAction() == ACTION_DOWN && ev.getRawY() > getHeight()) { in dispatchTouchEvent()
78 mTouchDownY = ev.getRawY(); in dispatchTouchEvent()
79 ev.setLocation(ev.getRawX(), mTopInset); in dispatchTouchEvent()
80 } else if (ev.getAction() == ACTION_MOVE && mTouchDownY != 0) { in dispatchTouchEvent()
81 ev.setLocation(ev.getRawX(), mTopInset + ev.getRawY() - mTouchDownY); in dispatchTouchEvent()
82 } else if (ev.getAction() == ACTION_UP) { in dispatchTouchEvent()
85 return super.dispatchTouchEvent(ev); in dispatchTouchEvent()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/
DRelativeTouchListener.kt39 abstract fun onDown(v: View, ev: MotionEvent): Boolean in onDown()
52 ev: MotionEvent, in onDown()
72 ev: MotionEvent, in onDown()
83 ev: MotionEvent, in onDown()
101 override fun onTouch(v: View, ev: MotionEvent): Boolean { in onTouch()
102 addMovement(ev) in onTouch()
104 val dx = touchDown?.let { ev.rawX - it.x } ?: 0f in onTouch()
105 val dy = touchDown?.let { ev.rawY - it.y } ?: 0f in onTouch()
107 when (ev.action) { in onTouch()
109 if (!onDown(v, ev)) { in onTouch()
[all …]
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/
DPipTouchState.java110 public void onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
111 mLastTouchDisplayId = ev.getDisplayId(); in onTouchEvent()
112 switch (ev.getActionMasked()) { in onTouchEvent()
120 addMovementToVelocityTracker(ev); in onTouchEvent()
122 mActivePointerId = ev.getPointerId(0); in onTouchEvent()
127 mLastTouch.set(ev.getRawX(), ev.getRawY()); in onTouchEvent()
131 mDownTouchTime = ev.getEventTime(); in onTouchEvent()
149 addMovementToVelocityTracker(ev); in onTouchEvent()
150 int pointerIndex = ev.findPointerIndex(mActivePointerId); in onTouchEvent()
157 float x = ev.getRawX(pointerIndex); in onTouchEvent()
[all …]
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/
DPipTouchState.java110 public void onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
111 mLastTouchDisplayId = ev.getDisplayId(); in onTouchEvent()
112 switch (ev.getActionMasked()) { in onTouchEvent()
120 addMovementToVelocityTracker(ev); in onTouchEvent()
122 mActivePointerId = ev.getPointerId(0); in onTouchEvent()
127 mLastTouch.set(ev.getRawX(), ev.getRawY()); in onTouchEvent()
131 mDownTouchTime = ev.getEventTime(); in onTouchEvent()
149 addMovementToVelocityTracker(ev); in onTouchEvent()
150 int pointerIndex = ev.findPointerIndex(mActivePointerId); in onTouchEvent()
157 float x = ev.getRawX(pointerIndex); in onTouchEvent()
[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/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 …]
DNonInterceptingScrollView.java46 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
47 int action = ev.getActionMasked(); in onTouchEvent()
66 return super.onTouchEvent(ev); in onTouchEvent()
70 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
72 int action = ev.getActionMasked(); in onInterceptTouchEvent()
85 mDownY = ev.getY(); in onInterceptTouchEvent()
88 final int y = (int) ev.getY(); in onInterceptTouchEvent()
97 return super.onInterceptTouchEvent(ev); in onInterceptTouchEvent()
/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 …]
/frameworks/native/services/sensorservice/
DRecentEventLogger.cpp66 const auto& ev = mRecentEvents[i]; in dump() local
67 struct tm * timeinfo = localtime(&(ev.mWallTime.tv_sec)); in dump()
69 ++j, ev.mEvent.timestamp/1e9, timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, in dump()
70 (int) ns2ms(ev.mWallTime.tv_nsec)); in dump()
75 buffer.appendFormat("%" PRIu64 ", ", ev.mEvent.u64.step_counter); in dump()
78 buffer.appendFormat("%.2f, ", ev.mEvent.data[k]); in dump()
102 const auto& ev = mRecentEvents[i]; in dump() local
104 proto->write(Event::TIMESTAMP_SEC, float(ev.mEvent.timestamp) / 1e9f); in dump()
105 proto->write(Event::WALL_TIMESTAMP_MS, ev.mWallTime.tv_sec * 1000LL in dump()
106 + ns2ms(ev.mWallTime.tv_nsec)); in dump()
[all …]
/frameworks/base/core/java/com/android/internal/widget/
DLinearLayoutWithDefaultTouchRecepient.java56 public boolean dispatchTouchEvent(MotionEvent ev) { in dispatchTouchEvent() argument
58 return super.dispatchTouchEvent(ev); in dispatchTouchEvent()
61 if (super.dispatchTouchEvent(ev)) { in dispatchTouchEvent()
66 ev.setLocation(ev.getX() + mTempRect.left, ev.getY() + mTempRect.top); in dispatchTouchEvent()
67 return mDefaultTouchRecepient.dispatchTouchEvent(ev); in dispatchTouchEvent()
/frameworks/base/core/java/android/view/
DGestureDetector.java569 public boolean onTouchEvent(@NonNull MotionEvent ev) { in onTouchEvent() argument
571 mInputEventConsistencyVerifier.onTouchEvent(ev, 0); in onTouchEvent()
574 final int action = ev.getAction(); in onTouchEvent()
579 mCurrentMotionEvent = MotionEvent.obtain(ev); in onTouchEvent()
584 mVelocityTracker.addMovement(ev); in onTouchEvent()
588 final int skipIndex = pointerUp ? ev.getActionIndex() : -1; in onTouchEvent()
590 (ev.getFlags() & MotionEvent.FLAG_IS_GENERATED_GESTURE) != 0; in onTouchEvent()
594 final int count = ev.getPointerCount(); in onTouchEvent()
597 sumX += ev.getX(i); in onTouchEvent()
598 sumY += ev.getY(i); in onTouchEvent()
[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/screenshot/ui/
DSwipeGestureListener.kt35 fun onMotionEvent(ev: MotionEvent): Boolean { in onMotionEvent()
36 ev.offsetLocation(view.translationX, 0f) in onMotionEvent()
37 when (ev.actionMasked) { in onMotionEvent()
39 velocityTracker.addMovement(ev) in onMotionEvent()
40 startX = ev.rawX in onMotionEvent()
62 velocityTracker.addMovement(ev) in onMotionEvent()
63 view.translationX = ev.rawX - startX in onMotionEvent()
/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()

12345678910