Home
last modified time | relevance | path

Searched refs:velocityTracker (Results 1 – 22 of 22) sorted by relevance

/frameworks/base/apct-tests/perftests/core/src/android/input/
DVelocityTrackerBenchmarkTest.kt57 abstract fun assertNonZeroVelocity(velocityTracker: VelocityTracker) in createMotionEvent()
99 override fun assertNonZeroVelocity(velocityTracker: VelocityTracker) { in assertNonZeroVelocity()
100 Assert.assertTrue(velocityTracker.getAxisVelocity(MotionEvent.AXIS_SCROLL) != 0f) in assertNonZeroVelocity()
135 override fun assertNonZeroVelocity(velocityTracker: VelocityTracker) { in assertNonZeroVelocity()
136 Assert.assertTrue(velocityTracker.getAxisVelocity(MotionEvent.AXIS_X) != 0f) in assertNonZeroVelocity()
137 Assert.assertTrue(velocityTracker.getAxisVelocity(MotionEvent.AXIS_Y) != 0f) in assertNonZeroVelocity()
167 private val velocityTracker = VelocityTracker.obtain() constant in android.input.VelocityTrackerBenchmarkTest
170 velocityTracker.clear() in setup()
205 velocityTracker.addMovement(motionEvent) in testAddMovement()
208 velocityTracker.computeCurrentVelocity(1000) in testAddMovement()
[all …]
/frameworks/base/packages/CredentialManager/horologist/src/com/google/android/horologist/compose/rotaryinput/
DRotaryVelocityTracker.kt25 private var velocityTracker: VelocityTracker1D = VelocityTracker1D(true) variable in com.google.android.horologist.compose.rotaryinput.RotaryVelocityTracker
31 get() = velocityTracker.calculateVelocity()
37 velocityTracker.resetTracking() in start()
38 velocityTracker.addDataPoint(currentTime, 0f) in start()
45 velocityTracker.addDataPoint(currentTime, delta) in move()
52 velocityTracker.resetTracking() in end()
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/ui/
DSwipeGestureListener.kt30 private val velocityTracker = VelocityTracker.obtain() constant in com.android.systemui.screenshot.ui.SwipeGestureListener
39 velocityTracker.addMovement(ev) in onMotionEvent()
43 velocityTracker.computeCurrentVelocity(1) in onMotionEvent()
44 val xVelocity = velocityTracker.xVelocity in onMotionEvent()
57 velocityTracker.clear() in onMotionEvent()
62 velocityTracker.addMovement(ev) in onMotionEvent()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/
DRelativeTouchListener.kt94 private val velocityTracker = VelocityTracker.obtain() constant
143 velocityTracker.computeCurrentVelocity(1000 /* units */) in onTouch()
145 velocityTracker.xVelocity, velocityTracker.yVelocity) in onTouch()
152 velocityTracker.clear() in onTouch()
160 velocityTracker.clear() in onTouch()
177 velocityTracker.addMovement(event) in addMovement()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/magnetictarget/
DMagnetizedObject.kt149 private val velocityTracker: VelocityTracker = VelocityTracker.obtain() in <lambda>() constant in com.android.wm.shell.common.magnetictarget.MagnetizedObject
334 velocityTracker.clear() in <lambda>()
378 velocityTracker.computeCurrentVelocity(1000) in <lambda>()
379 val velX = velocityTracker.xVelocity in <lambda>()
380 val velY = velocityTracker.yVelocity in <lambda>()
398 velocityTracker.computeCurrentVelocity(1000) in <lambda>()
405 velocityTracker.xVelocity, velocityTracker.yVelocity, in <lambda>()
414 velocityTracker.computeCurrentVelocity(1000 /* units */) in <lambda>()
415 val velX = velocityTracker.xVelocity in <lambda>()
416 val velY = velocityTracker.yVelocity in <lambda>()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DPulseExpansionHandler.kt110 private var velocityTracker: VelocityTracker? = null in <lambda>() variable
145 if (velocityTracker == null) { in <lambda>()
146 velocityTracker = VelocityTracker.obtain() in <lambda>()
148 velocityTracker!!.addMovement(event) in <lambda>()
187 velocityTracker?.recycle() in <lambda>()
188 velocityTracker = null in <lambda>()
202 if (velocityTracker == null || !isExpanding || in <lambda>()
206 velocityTracker!!.addMovement(event) in <lambda>()
213 velocityTracker!!.computeCurrentVelocity( in <lambda>()
217 val canExpand = moveDistance > 0 && velocityTracker!!.getYVelocity() > -1000 && in <lambda>()
/frameworks/base/packages/SystemUI/src/com/android/systemui/haptics/slider/
DSeekbarHapticPlugin.kt47 private val velocityTracker = VelocityTracker.obtain() constant
54 velocityTracker,
110 MotionEvent.ACTION_CANCEL -> velocityTracker.clear() in stop()
112 MotionEvent.ACTION_MOVE -> velocityTracker.addMovement(event) in stop()
DSliderHapticFeedbackProvider.kt41 private val velocityTracker: VelocityTracker, constant in com.android.systemui.haptics.slider.SliderHapticFeedbackProvider
184 velocityTracker.computeCurrentVelocity(UNITS_SECOND, config.maxVelocityToScale) in getTrackedVelocity()
185 return if (velocityTracker.isAxisSupported(config.velocityAxis)) { in getTrackedVelocity()
186 velocityTracker.getAxisVelocity(config.velocityAxis) in getTrackedVelocity()
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/
DDistanceClassifier.java131 VelocityTracker velocityTracker = VelocityTracker.obtain(); in calculateDistances() local
133 velocityTracker.addMovement(motionEvent); in calculateDistances()
135 velocityTracker.computeCurrentVelocity(1); in calculateDistances()
137 float vX = velocityTracker.getXVelocity(); in calculateDistances()
138 float vY = velocityTracker.getYVelocity(); in calculateDistances()
140 velocityTracker.recycle(); in calculateDistances()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/haptics/slider/
DSliderHapticFeedbackProviderTest.kt41 @Mock private lateinit var velocityTracker: VelocityTracker variable in com.android.systemui.haptics.slider.SliderHapticFeedbackProviderTest
55 whenever(velocityTracker.isAxisSupported(config.velocityAxis)).thenReturn(true) in setup()
56 whenever(velocityTracker.getAxisVelocity(config.velocityAxis)) in setup()
64 velocityTracker, in setup()
/frameworks/base/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/
DMultiPointerDraggable.kt129 private val velocityTracker = VelocityTracker() constant
186 velocityTracker.resetTracking() in onCancelPointerInput()
190 velocityTracker.addPointerInputChange(change) in onCancelPointerInput()
197 val velocity = velocityTracker.calculateVelocity(maxVelocity) in onCancelPointerInput()
/frameworks/base/core/java/android/view/
DGestureDetector.java793 final VelocityTracker velocityTracker = mVelocityTracker; in onTouchEvent() local
795 velocityTracker.computeCurrentVelocity(1000, mMaximumFlingVelocity); in onTouchEvent()
796 final float velocityY = velocityTracker.getYVelocity(pointerId); in onTouchEvent()
797 final float velocityX = velocityTracker.getXVelocity(pointerId); in onTouchEvent()
/frameworks/base/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/
DBackPanelController.kt146 private var velocityTracker: VelocityTracker? = null in <lambda>() variable
297 velocityTracker!!.addMovement(event) in <lambda>()
372 velocityTracker = null in <lambda>()
380 velocityTracker = null in <lambda>()
678 velocityTracker?.run { in <lambda>()
1028 velocityTracker?.run { in <lambda>()
/frameworks/base/core/java/android/widget/
DSlidingDrawer.java437 final VelocityTracker velocityTracker = mVelocityTracker; in onTouchEvent() local
438 velocityTracker.computeCurrentVelocity(mVelocityUnits); in onTouchEvent()
440 float yVelocity = velocityTracker.getYVelocity(); in onTouchEvent()
441 float xVelocity = velocityTracker.getXVelocity(); in onTouchEvent()
DScrollView.java908 final VelocityTracker velocityTracker = mVelocityTracker; in onTouchEvent() local
909 velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity); in onTouchEvent()
910 int initialVelocity = (int) velocityTracker.getYVelocity(mActivePointerId); in onTouchEvent()
921 velocityTracker.clear(); in onTouchEvent()
DHorizontalScrollView.java798 final VelocityTracker velocityTracker = mVelocityTracker; in onTouchEvent() local
799 velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity); in onTouchEvent()
800 int initialVelocity = (int) velocityTracker.getXVelocity(mActivePointerId); in onTouchEvent()
DNumberPicker.java978 VelocityTracker velocityTracker = mVelocityTracker; in onTouchEvent() local
979 velocityTracker.computeCurrentVelocity(1000, mMaximumFlingVelocity); in onTouchEvent()
980 int initialVelocity = (int) velocityTracker.getYVelocity(); in onTouchEvent()
DAbsListView.java4284 final VelocityTracker velocityTracker = mVelocityTracker; in onTouchUp()
4285 velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity); in onTouchUp()
4288 (velocityTracker.getYVelocity(mActivePointerId) * mVelocityScale); in onTouchUp()
4353 final VelocityTracker velocityTracker = mVelocityTracker; in onTouchUp() local
4354 velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity); in onTouchUp()
4355 final int initialVelocity = (int) velocityTracker.getYVelocity(mActivePointerId); in onTouchUp()
/frameworks/native/services/inputflinger/reader/mapper/
DTouchInputMapper.h667 VelocityTracker velocityTracker; member
678 velocityTracker.clear(); in reset()
DTouchInputMapper.cpp2736 mPointerGesture.velocityTracker.addMovement(when, id, AMOTION_EVENT_AXIS_X, x); in preparePointerGestures()
2737 mPointerGesture.velocityTracker.addMovement(when, id, AMOTION_EVENT_AXIS_Y, y); in preparePointerGestures()
3039 mPointerGesture.velocityTracker.getVelocity(AMOTION_EVENT_AXIS_X, id); in getFastestFinger()
3041 mPointerGesture.velocityTracker.getVelocity(AMOTION_EVENT_AXIS_Y, id); in getFastestFinger()
/frameworks/base/core/java/com/android/internal/widget/
DViewPager.java2028 final VelocityTracker velocityTracker = mVelocityTracker;
2029 velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);
2030 … final int initialVelocity = (int) velocityTracker.getXVelocity(mActivePointerId);
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/
DNotificationStackScrollLayout.java3657 final VelocityTracker velocityTracker = mVelocityTracker; in onScrollTouch() local
3658 velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity); in onScrollTouch()
3659 int initialVelocity = (int) velocityTracker.getYVelocity(mActivePointerId); in onScrollTouch()