/frameworks/base/services/core/java/com/android/server/connectivity/ |
D | DefaultNetworkMetrics.java | 73 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/ |
D | NearestTouchFrameTest.java | 88 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/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/ |
D | DragDetector.java | 58 boolean onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 60 (ev.getSource() & SOURCE_TOUCHSCREEN) == SOURCE_TOUCHSCREEN; in onMotionEvent() 64 return mEventHandler.handleMotionEvent(ev); in onMotionEvent() 66 switch (ev.getActionMasked()) { in onMotionEvent() 68 mDragPointerId = ev.getPointerId(0); in onMotionEvent() 69 float rawX = ev.getRawX(0); in onMotionEvent() 70 float rawY = ev.getRawY(0); in onMotionEvent() 72 mResultOfDownAction = mEventHandler.handleMotionEvent(ev); in onMotionEvent() 77 int dragPointerIndex = ev.findPointerIndex(mDragPointerId); in onMotionEvent() 78 float dx = ev.getRawX(dragPointerIndex) - mInputDownPoint.x; in onMotionEvent() [all …]
|
/frameworks/base/cmds/hid/jni/ |
D | com_android_commands_hid_Device.cpp | 154 struct uhid_event ev = {}; in open() local 155 ev.type = UHID_CREATE2; in open() 156 strlcpy(reinterpret_cast<char*>(ev.u.create2.name), name, sizeof(ev.u.create2.name)); in open() 158 strlcpy(reinterpret_cast<char*>(ev.u.create2.uniq), uniq.c_str(), sizeof(ev.u.create2.uniq)); in open() 159 memcpy(&ev.u.create2.rd_data, descriptor.data(), size * sizeof(ev.u.create2.rd_data[0])); in open() 160 ev.u.create2.rd_size = size; in open() 161 ev.u.create2.bus = bus; in open() 162 ev.u.create2.vendor = vid; in open() 163 ev.u.create2.product = pid; in open() 164 ev.u.create2.version = 0; in open() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/touch/ |
D | SwipeDetector.java | 74 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/packages/SystemUI/src/com/android/systemui/statusbar/gesture/ |
D | SwipeUpGestureHandler.kt | 49 override fun onInputEvent(ev: InputEvent) { in onInputEvent() 50 if (ev !is MotionEvent) { in onInputEvent() 54 when (ev.actionMasked) { in onInputEvent() 57 startOfGestureIsWithinBounds(ev) in onInputEvent() 59 logger.logGestureDetectionStarted(loggerTag, ev.y.toInt()) in onInputEvent() 60 startY = ev.y in onInputEvent() 61 startTime = ev.eventTime in onInputEvent() 73 ev.y < startY && in onInputEvent() 75 (startY - ev.y) >= swipeDistanceThreshold && in onInputEvent() 77 (ev.eventTime - startTime) < SWIPE_TIMEOUT_MS in onInputEvent() [all …]
|
/frameworks/base/core/java/android/net/metrics/ |
D | IpConnectivityLog.java | 94 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/native/libs/gui/ |
D | DisplayEventDispatcher.cpp | 160 const DisplayEventReceiver::Event& ev = buf[i]; in processPendingEvents() local 161 switch (ev.header.type) { in processPendingEvents() 166 *outTimestamp = ev.header.timestamp; in processPendingEvents() 167 *outDisplayId = ev.header.displayId; in processPendingEvents() 168 *outCount = ev.vsync.count; in processPendingEvents() 169 *outVsyncEventData = ev.vsync.vsyncData; in processPendingEvents() 172 dispatchHotplug(ev.header.timestamp, ev.header.displayId, ev.hotplug.connected); in processPendingEvents() 175 dispatchModeChanged(ev.header.timestamp, ev.header.displayId, in processPendingEvents() 176 ev.modeChange.modeId, ev.modeChange.vsyncPeriod); in processPendingEvents() 179 dispatchNullEvent(ev.header.timestamp, ev.header.displayId); in processPendingEvents() [all …]
|
/frameworks/rs/tests/java_api/Balls/src/com/example/android/rs/balls/ |
D | BallsView.java | 74 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/ |
D | StatusBarWindowView.java | 75 public boolean dispatchTouchEvent(MotionEvent ev) { in dispatchTouchEvent() argument 76 if (ev.getAction() == ACTION_DOWN && ev.getRawY() > getHeight()) { in dispatchTouchEvent() 77 mTouchDownY = ev.getRawY(); in dispatchTouchEvent() 78 ev.setLocation(ev.getRawX(), mTopInset); in dispatchTouchEvent() 79 } else if (ev.getAction() == ACTION_MOVE && mTouchDownY != 0) { in dispatchTouchEvent() 80 ev.setLocation(ev.getRawX(), mTopInset + ev.getRawY() - mTouchDownY); in dispatchTouchEvent() 81 } else if (ev.getAction() == ACTION_UP) { in dispatchTouchEvent() 84 return super.dispatchTouchEvent(ev); in dispatchTouchEvent()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/ |
D | PipTouchState.java | 93 public void onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 94 mLastTouchDisplayId = ev.getDisplayId(); in onTouchEvent() 95 switch (ev.getActionMasked()) { in onTouchEvent() 103 addMovementToVelocityTracker(ev); in onTouchEvent() 105 mActivePointerId = ev.getPointerId(0); in onTouchEvent() 110 mLastTouch.set(ev.getRawX(), ev.getRawY()); in onTouchEvent() 114 mDownTouchTime = ev.getEventTime(); in onTouchEvent() 132 addMovementToVelocityTracker(ev); in onTouchEvent() 133 int pointerIndex = ev.findPointerIndex(mActivePointerId); in onTouchEvent() 140 float x = ev.getRawX(pointerIndex); in onTouchEvent() [all …]
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/ |
D | RelativeTouchListener.kt | 39 abstract fun onDown(v: View, ev: MotionEvent): Boolean in onDown() 52 ev: MotionEvent, in onDown() 72 ev: MotionEvent, in onDown() 95 override fun onTouch(v: View, ev: MotionEvent): Boolean { in onDown() 96 addMovement(ev) in onDown() 98 val dx = ev.rawX - touchDown.x in onDown() 99 val dy = ev.rawY - touchDown.y in onDown() 101 when (ev.action) { in onDown() 103 if (!onDown(v, ev)) { in onDown() 111 touchDown.set(ev.rawX, ev.rawY) in onDown() [all …]
|
/frameworks/opt/photoviewer/src/com/android/ex/photo/ |
D | PhotoViewPager.java | 114 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/ |
D | QSScrollLayout.java | 68 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 …]
|
D | NonInterceptingScrollView.java | 46 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/ |
D | ObservableScrollView.java | 70 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/ |
D | RecentEventLogger.cpp | 66 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/packages/SystemUI/src/com/android/systemui/shade/ |
D | NotificationShadeWindowViewController.java | 195 public Boolean handleDispatchTouchEvent(MotionEvent ev) { in setupExpandedStatusBar() 200 boolean isDown = ev.getActionMasked() == MotionEvent.ACTION_DOWN; in setupExpandedStatusBar() 201 boolean isUp = ev.getActionMasked() == MotionEvent.ACTION_UP; in setupExpandedStatusBar() 202 boolean isCancel = ev.getActionMasked() == MotionEvent.ACTION_CANCEL; in setupExpandedStatusBar() 219 } else if (ev.getActionMasked() == MotionEvent.ACTION_UP in setupExpandedStatusBar() 220 || ev.getActionMasked() == MotionEvent.ACTION_CANCEL) { in setupExpandedStatusBar() 241 mFalsingCollector.onTouchEvent(ev); in setupExpandedStatusBar() 242 mPulsingWakeupGestureHandler.onTouchEvent(ev); in setupExpandedStatusBar() 243 if (mStatusBarKeyguardViewManager.onTouch(ev)) { in setupExpandedStatusBar() 251 if (ev.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN) { in setupExpandedStatusBar() [all …]
|
/frameworks/base/core/java/android/view/ |
D | GestureDetector.java | 535 public boolean onTouchEvent(@NonNull MotionEvent ev) { in onTouchEvent() argument 537 mInputEventConsistencyVerifier.onTouchEvent(ev, 0); in onTouchEvent() 540 final int action = ev.getAction(); in onTouchEvent() 545 mCurrentMotionEvent = MotionEvent.obtain(ev); in onTouchEvent() 550 mVelocityTracker.addMovement(ev); in onTouchEvent() 554 final int skipIndex = pointerUp ? ev.getActionIndex() : -1; in onTouchEvent() 556 (ev.getFlags() & MotionEvent.FLAG_IS_GENERATED_GESTURE) != 0; in onTouchEvent() 560 final int count = ev.getPointerCount(); in onTouchEvent() 563 sumX += ev.getX(i); in onTouchEvent() 564 sumY += ev.getY(i); in onTouchEvent() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/ |
D | ExpandHelper.java | 289 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 293 trackVelocity(ev); in onInterceptTouchEvent() 294 final int action = ev.getAction(); in onInterceptTouchEvent() 301 mSGD.onTouchEvent(ev); in onInterceptTouchEvent() 312 mLastMotionY = ev.getRawY(); in onInterceptTouchEvent() 313 maybeRecycleVelocityTracker(ev); in onInterceptTouchEvent() 331 final float yDiff = ev.getRawY() - mInitialTouchY; in onInterceptTouchEvent() 332 final float xDiff = ev.getRawX() - mInitialTouchX; in onInterceptTouchEvent() 333 if (yDiff > getTouchSlop(ev) && yDiff > Math.abs(xDiff)) { in onInterceptTouchEvent() 338 mLastMotionY = ev.getRawY(); in onInterceptTouchEvent() [all …]
|
D | SwipeHelper.java | 174 private float getPos(MotionEvent ev) { in getPos() argument 175 return mSwipeDirection == X ? ev.getX() : ev.getY(); in getPos() 178 private float getPerpendicularPos(MotionEvent ev) { in getPerpendicularPos() argument 179 return mSwipeDirection == X ? ev.getY() : ev.getX(); in getPerpendicularPos() 309 public boolean onInterceptTouchEvent(final MotionEvent ev) { in onInterceptTouchEvent() argument 313 mMenuRowIntercepting = nmr.onInterceptTouchEvent(mTouchedView, ev); in onInterceptTouchEvent() 316 final int action = ev.getAction(); in onInterceptTouchEvent() 327 mTouchedView = mCallback.getChildAtPosition(ev); in onInterceptTouchEvent() 330 onDownUpdate(mTouchedView, ev); in onInterceptTouchEvent() 332 mVelocityTracker.addMovement(ev); in onInterceptTouchEvent() [all …]
|
/frameworks/base/core/java/com/android/internal/widget/ |
D | LinearLayoutWithDefaultTouchRecepient.java | 56 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/services/core/java/com/android/server/trust/ |
D | TrustArchive.java | 119 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/rs/tests/java_api/RsTest_11/src/com/android/rs/test/ |
D | RSTestView.java | 82 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_16/src/com/android/rs/test/ |
D | RSTestView.java | 82 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()
|