Home
last modified time | relevance | path

Searched refs:eventTime (Results 1 – 25 of 68) sorted by relevance

123

/frameworks/native/services/inputflinger/
DInputListener.cpp30 uint32_t sequenceNum, nsecs_t eventTime) : in NotifyConfigurationChangedArgs() argument
31 NotifyArgs(sequenceNum, eventTime) { in NotifyConfigurationChangedArgs()
36 NotifyArgs(other.sequenceNum, other.eventTime) { in NotifyConfigurationChangedArgs()
40 return sequenceNum == rhs.sequenceNum && eventTime == rhs.eventTime; in operator ==()
50 NotifyKeyArgs::NotifyKeyArgs(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId, in NotifyKeyArgs() argument
54 NotifyArgs(sequenceNum, eventTime), deviceId(deviceId), source(source), in NotifyKeyArgs()
61 NotifyArgs(other.sequenceNum, other.eventTime), deviceId(other.deviceId), in NotifyKeyArgs()
70 && eventTime == rhs.eventTime in operator ==()
90 NotifyMotionArgs::NotifyMotionArgs(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId, in NotifyMotionArgs() argument
98 NotifyArgs(sequenceNum, eventTime), deviceId(deviceId), source(source), in NotifyMotionArgs()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/
DClassifierTest.java78 MotionEvent appendDownEvent(float x, float y, long eventTime) { in appendDownEvent() argument
79 return appendMotionEvent(MotionEvent.ACTION_DOWN, x, y, eventTime); in appendDownEvent()
86 MotionEvent appendMoveEvent(float x, float y, long eventTime) { in appendMoveEvent() argument
87 return appendMotionEvent(MotionEvent.ACTION_MOVE, x, y, eventTime); in appendMoveEvent()
95 MotionEvent appendUpEvent(float x, float y, long eventTime) { in appendUpEvent() argument
96 return appendMotionEvent(MotionEvent.ACTION_UP, x, y, eventTime); in appendUpEvent()
101 long eventTime = mMotionEvents.isEmpty() ? 1 : mMotionEvents.get( in appendMotionEvent() local
103 return appendMotionEvent(actionType, x, y, eventTime); in appendMotionEvent()
106 private MotionEvent appendMotionEvent(int actionType, float x, float y, long eventTime) { in appendMotionEvent() argument
110 MotionEvent motionEvent = MotionEvent.obtain(1, eventTime, actionType, x, y, in appendMotionEvent()
/frameworks/base/services/tests/servicestests/src/com/android/server/
DGestureLauncherServiceTest.java178 long eventTime = INITIAL_EVENT_TIME_MILLIS + in testInterceptPowerKeyDown_firstPowerDownCameraPowerGestureOnInteractive() local
180 KeyEvent keyEvent = new KeyEvent(IGNORED_DOWN_TIME, eventTime, IGNORED_ACTION, IGNORED_CODE, in testInterceptPowerKeyDown_firstPowerDownCameraPowerGestureOnInteractive()
189 verify(mMetricsLogger).histogram("power_double_tap_interval", (int) eventTime); in testInterceptPowerKeyDown_firstPowerDownCameraPowerGestureOnInteractive()
198 long eventTime = INITIAL_EVENT_TIME_MILLIS; in testInterceptPowerKeyDown_intervalInBoundsCameraPowerGestureOffInteractive() local
199 KeyEvent keyEvent = new KeyEvent(IGNORED_DOWN_TIME, eventTime, IGNORED_ACTION, IGNORED_CODE, in testInterceptPowerKeyDown_intervalInBoundsCameraPowerGestureOffInteractive()
209 eventTime += interval; in testInterceptPowerKeyDown_intervalInBoundsCameraPowerGestureOffInteractive()
210 keyEvent = new KeyEvent(IGNORED_DOWN_TIME, eventTime, IGNORED_ACTION, IGNORED_CODE, in testInterceptPowerKeyDown_intervalInBoundsCameraPowerGestureOffInteractive()
242 long eventTime = INITIAL_EVENT_TIME_MILLIS; in testInterceptPowerKeyDown_intervalMidBoundsCameraPowerGestureOffInteractive() local
243 KeyEvent keyEvent = new KeyEvent(IGNORED_DOWN_TIME, eventTime, IGNORED_ACTION, IGNORED_CODE, in testInterceptPowerKeyDown_intervalMidBoundsCameraPowerGestureOffInteractive()
253 eventTime += interval; in testInterceptPowerKeyDown_intervalMidBoundsCameraPowerGestureOffInteractive()
[all …]
/frameworks/native/libs/input/
DVelocityTracker.cpp230 void VelocityTracker::addMovement(nsecs_t eventTime, BitSet32 idBits, const Position* positions) { in addMovement() argument
236 && eventTime >= mLastEventTime + ASSUME_POINTER_STOPPED_TIME) { in addMovement()
239 (eventTime - mLastEventTime) * 0.000001f); in addMovement()
245 mLastEventTime = eventTime; in addMovement()
252 mStrategy->addMovement(eventTime, idBits, positions); in addMovement()
256 eventTime, idBits.value, mActivePointerId); in addMovement()
322 nsecs_t eventTime; in addMovement() local
327 eventTime = event->getHistoricalEventTime(h); in addMovement()
333 addMovement(eventTime, idBits, positions); in addMovement()
336 eventTime = event->getEventTime(); in addMovement()
[all …]
DVelocityControl.cpp52 void VelocityControl::move(nsecs_t eventTime, float* deltaX, float* deltaY) { in move() argument
54 if (eventTime >= mLastMovementTime + STOP_TIME) { in move()
57 (eventTime - mLastMovementTime) * 0.000001f); in move()
62 mLastMovementTime = eventTime; in move()
69 mVelocityTracker.addMovement(eventTime, BitSet32(BitSet32::valueForBit(0)), &mRawPosition); in move()
DInputTransport.cpp136 msg->body.key.eventTime = body.key.eventTime; in getSanitizedCopy()
163 msg->body.motion.eventTime = body.motion.eventTime; in getSanitizedCopy()
430 nsecs_t eventTime) { in publishKeyEvent() argument
442 downTime, eventTime); in publishKeyEvent()
463 msg.body.key.eventTime = eventTime; in publishKeyEvent()
484 nsecs_t eventTime, in publishMotionEvent() argument
504 xOffset, yOffset, xPrecision, yPrecision, downTime, eventTime, pointerCount); in publishMotionEvent()
536 msg.body.motion.eventTime = eventTime; in publishMotionEvent()
863 nsecs_t eventTime = msg.body.motion.eventTime; in rewriteMessage() local
867 if (eventTime < state.lastResample.eventTime || in rewriteMessage()
[all …]
/frameworks/base/test-runner/src/android/test/
DTouchUtils.java259 long eventTime = SystemClock.uptimeMillis(); in tapView() local
261 MotionEvent event = MotionEvent.obtain(downTime, eventTime, in tapView()
266 eventTime = SystemClock.uptimeMillis(); in tapView()
268 event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_MOVE, in tapView()
273 eventTime = SystemClock.uptimeMillis(); in tapView()
274 event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_UP, x, y, 0); in tapView()
299 long eventTime = SystemClock.uptimeMillis(); in touchAndCancelView() local
301 MotionEvent event = MotionEvent.obtain(downTime, eventTime, in touchAndCancelView()
306 eventTime = SystemClock.uptimeMillis(); in touchAndCancelView()
308 event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_CANCEL, in touchAndCancelView()
[all …]
/frameworks/native/include/input/
DVelocityTracker.h83 void addMovement(nsecs_t eventTime, BitSet32 idBits, const Position* positions);
130 virtual void addMovement(nsecs_t eventTime, BitSet32 idBits,
162 virtual void addMovement(nsecs_t eventTime, BitSet32 idBits,
176 nsecs_t eventTime; member
205 virtual void addMovement(nsecs_t eventTime, BitSet32 idBits,
223 void initState(State& state, nsecs_t eventTime, float xpos, float ypos) const;
224 void updateState(State& state, nsecs_t eventTime, float xpos, float ypos) const;
239 virtual void addMovement(nsecs_t eventTime, BitSet32 idBits,
254 nsecs_t eventTime; member
274 virtual void addMovement(nsecs_t eventTime, BitSet32 idBits,
[all …]
DInputTransport.h78 nsecs_t eventTime __attribute__((aligned(8))); member
99 nsecs_t eventTime __attribute__((aligned(8))); member
254 nsecs_t eventTime);
281 nsecs_t eventTime,
400 nsecs_t eventTime; member
406 eventTime = msg.body.motion.eventTime; in initializeFrom()
417 eventTime = other.eventTime; in initializeFrom()
449 lastResample.eventTime = 0; in initialize()
/frameworks/native/services/inputflinger/include/
DInputListener.h35 nsecs_t eventTime; member
37 inline NotifyArgs() : sequenceNum(0), eventTime(0) { } in NotifyArgs()
39 inline explicit NotifyArgs(uint32_t sequenceNum, nsecs_t eventTime) : in NotifyArgs()
40 sequenceNum(sequenceNum), eventTime(eventTime) { } in NotifyArgs()
55 NotifyConfigurationChangedArgs(uint32_t sequenceNum, nsecs_t eventTime);
80 NotifyKeyArgs(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId, uint32_t source,
127 NotifyMotionArgs(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId, uint32_t source,
154 NotifySwitchArgs(uint32_t sequenceNum, nsecs_t eventTime, uint32_t policyFlags,
174 NotifyDeviceResetArgs(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId);
/frameworks/base/core/tests/coretests/src/android/view/
DPinchZoomAction.java82 long eventTime = startTime; in sendPinchZoomAction() local
86 eventTime, MotionEvent.ACTION_DOWN, 1, pointerProperties, pointerCoords, in sendPinchZoomAction()
89 eventTime = SystemClock.uptimeMillis(); in sendPinchZoomAction()
90 final MotionEvent secondFingerEvent = MotionEvent.obtain(startTime, eventTime, in sendPinchZoomAction()
123 eventTime = SystemClock.uptimeMillis(); in sendPinchZoomAction()
130 final MotionEvent event = MotionEvent.obtain(startTime, eventTime, in sendPinchZoomAction()
147 eventTime = SystemClock.uptimeMillis(); in sendPinchZoomAction()
150 final MotionEvent secondFingerUpEvent = MotionEvent.obtain(startTime, eventTime, in sendPinchZoomAction()
163 eventTime = SystemClock.uptimeMillis(); in sendPinchZoomAction()
165 final MotionEvent firstFingerUpEvent = MotionEvent.obtain(startTime, eventTime, in sendPinchZoomAction()
/frameworks/base/cmds/statsd/src/metrics/duration_helper/
DMaxDurationTracker.cpp44 unique_ptr<DurationTracker> MaxDurationTracker::clone(const int64_t eventTime) { in clone() argument
48 it->second.lastStartTime = eventTime; in clone()
83 const int64_t eventTime, const ConditionKey& conditionKey) { in noteStart() argument
108 duration.lastStartTime = eventTime; in noteStart()
109 startAnomalyAlarm(eventTime); in noteStart()
117 void MaxDurationTracker::noteStop(const HashableDimensionKey& key, const int64_t eventTime, in noteStop() argument
133 stopAnomalyAlarm(eventTime); in noteStop()
135 int64_t durationTime = eventTime - duration.lastStartTime; in noteStop()
137 (long long)duration.lastStartTime, (long long)eventTime, in noteStop()
143 startAnomalyAlarm(eventTime); in noteStop()
[all …]
DDurationTracker.h86 virtual unique_ptr<DurationTracker> clone(const int64_t eventTime) = 0;
89 const int64_t eventTime, const ConditionKey& conditionKey) = 0;
90 virtual void noteStop(const HashableDimensionKey& key, const int64_t eventTime,
92 virtual void noteStopAll(const int64_t eventTime) = 0;
125 void startAnomalyAlarm(const int64_t eventTime) { in startAnomalyAlarm() argument
129 predictAnomalyTimestampNs(*anomalyTracker, eventTime); in startAnomalyAlarm()
DMaxDurationTracker.h41 unique_ptr<DurationTracker> clone(const int64_t eventTime) override;
43 void noteStart(const HashableDimensionKey& key, bool condition, const int64_t eventTime,
45 void noteStop(const HashableDimensionKey& key, const int64_t eventTime,
47 void noteStopAll(const int64_t eventTime) override;
DOringDurationTracker.h40 unique_ptr<DurationTracker> clone(const int64_t eventTime) override;
42 void noteStart(const HashableDimensionKey& key, bool condition, const int64_t eventTime,
44 void noteStop(const HashableDimensionKey& key, const int64_t eventTime,
46 void noteStopAll(const int64_t eventTime) override;
/frameworks/base/cmds/statsd/src/metrics/
DDurationMetricProducer.h74 void onConditionChangedLocked(const bool conditionMet, const int64_t eventTime) override;
80 void onSlicedConditionMayChangeLocked(bool overallCondition, const int64_t eventTime) override;
85 void onSlicedConditionMayChangeLocked_opt1(bool overallCondition, const int64_t eventTime);
86 void onSlicedConditionMayChangeLocked_opt2(bool overallCondition, const int64_t eventTime);
96 void flushIfNeededLocked(const int64_t& eventTime);
DMetricProducer.h138 void onConditionChanged(const bool condition, const int64_t eventTime) { in onConditionChanged() argument
140 onConditionChangedLocked(condition, eventTime); in onConditionChanged()
143 void onSlicedConditionMayChange(bool overallCondition, const int64_t eventTime) { in onSlicedConditionMayChange() argument
145 onSlicedConditionMayChangeLocked(overallCondition, eventTime); in onSlicedConditionMayChange()
255 virtual void onConditionChangedLocked(const bool condition, const int64_t eventTime) = 0;
257 const int64_t eventTime) = 0;
284 virtual void flushIfNeededLocked(const int64_t& eventTime){}; in flushIfNeededLocked() argument
DDurationMetricProducer.cpp184 const int64_t eventTime) { in onSlicedConditionMayChangeLocked_opt1() argument
223 currentUnSlicedPartCondition, eventTime); in onSlicedConditionMayChangeLocked_opt1()
238 condIt.second->onConditionChanged(true, eventTime); in onSlicedConditionMayChangeLocked_opt1()
244 condIt.second->onConditionChanged(false, eventTime); in onSlicedConditionMayChangeLocked_opt1()
257 const int64_t eventTime) { in onSlicedConditionMayChangeLocked_opt2() argument
302 condIt->second->onConditionChanged(false, eventTime); in onSlicedConditionMayChangeLocked_opt2()
317 currentUnSlicedPartCondition, eventTime); in onSlicedConditionMayChangeLocked_opt2()
327 whatIt.second.begin()->second->clone(eventTime); in onSlicedConditionMayChangeLocked_opt2()
330 newTracker->onConditionChanged(true, eventTime); in onSlicedConditionMayChangeLocked_opt2()
427 const int64_t eventTime) { in onSlicedConditionMayChangeLocked() argument
[all …]
DEventMetricProducer.h57 void onConditionChangedLocked(const bool conditionMet, const int64_t eventTime) override;
60 void onSlicedConditionMayChangeLocked(bool overallCondition, const int64_t eventTime) override;
/frameworks/base/cmds/uiautomator/library/core-src/com/android/uiautomator/core/
DInteractionController.java189 final long eventTime = SystemClock.uptimeMillis(); in sendKeyAndWaitForEvent()
190 KeyEvent downEvent = new KeyEvent(eventTime, eventTime, KeyEvent.ACTION_DOWN, in sendKeyAndWaitForEvent()
194 KeyEvent upEvent = new KeyEvent(eventTime, eventTime, KeyEvent.ACTION_UP, in sendKeyAndWaitForEvent()
317 final long eventTime = SystemClock.uptimeMillis();
319 mDownTime, eventTime, MotionEvent.ACTION_UP, x, y, 1);
329 final long eventTime = SystemClock.uptimeMillis();
331 mDownTime, eventTime, MotionEvent.ACTION_MOVE, x, y, 1);
546 final long eventTime = SystemClock.uptimeMillis();
547 KeyEvent downEvent = new KeyEvent(eventTime, eventTime, KeyEvent.ACTION_DOWN,
551 KeyEvent upEvent = new KeyEvent(eventTime, eventTime, KeyEvent.ACTION_UP,
/frameworks/base/core/java/android/view/
DKeyEvent.java1382 public KeyEvent(long downTime, long eventTime, int action, in KeyEvent() argument
1385 mEventTime = eventTime; in KeyEvent()
1406 public KeyEvent(long downTime, long eventTime, int action, in KeyEvent() argument
1409 mEventTime = eventTime; in KeyEvent()
1433 public KeyEvent(long downTime, long eventTime, int action, in KeyEvent() argument
1437 mEventTime = eventTime; in KeyEvent()
1463 public KeyEvent(long downTime, long eventTime, int action, in KeyEvent() argument
1467 mEventTime = eventTime; in KeyEvent()
1495 public KeyEvent(long downTime, long eventTime, int action, in KeyEvent() argument
1499 mEventTime = eventTime; in KeyEvent()
[all …]
DMotionEvent.java1688 static public MotionEvent obtain(long downTime, long eventTime, in obtain() argument
1697 downTime * NS_PER_MS, eventTime * NS_PER_MS, in obtain()
1735 public static MotionEvent obtain(long downTime, long eventTime, in obtain() argument
1740 return obtain(downTime, eventTime, action, pointerCount, pointerProperties, pointerCoords, in obtain()
1775 static public MotionEvent obtain(long downTime, long eventTime, in obtain() argument
1786 return obtain(downTime, eventTime, action, pointerCount, pp, in obtain()
1821 static public MotionEvent obtain(long downTime, long eventTime, int action, in obtain() argument
1824 return obtain(downTime, eventTime, action, x, y, pressure, size, metaState, in obtain()
1861 public static MotionEvent obtain(long downTime, long eventTime, int action, in obtain() argument
1883 downTime * NS_PER_MS, eventTime * NS_PER_MS, in obtain()
[all …]
/frameworks/base/services/core/java/com/android/server/power/
DPowerManagerService.java1343 private void userActivityFromNative(long eventTime, int event, int flags) { in userActivityFromNative() argument
1344 userActivityInternal(eventTime, event, flags, Process.SYSTEM_UID); in userActivityFromNative()
1347 private void userActivityInternal(long eventTime, int event, int flags, int uid) { in userActivityInternal() argument
1349 if (userActivityNoUpdateLocked(eventTime, event, flags, uid)) { in userActivityInternal()
1365 private boolean userActivityNoUpdateLocked(long eventTime, int event, int flags, int uid) { in userActivityNoUpdateLocked() argument
1367 Slog.d(TAG, "userActivityNoUpdateLocked: eventTime=" + eventTime in userActivityNoUpdateLocked()
1372 if (eventTime < mLastSleepTime || eventTime < mLastWakeTime in userActivityNoUpdateLocked()
1379 if (eventTime > mLastInteractivePowerHintTime) { in userActivityNoUpdateLocked()
1381 mLastInteractivePowerHintTime = eventTime; in userActivityNoUpdateLocked()
1385 mAttentionDetector.onUserActivity(eventTime, event); in userActivityNoUpdateLocked()
[all …]
/frameworks/base/services/core/jni/
Dcom_android_server_power_PowerManagerService.cpp155 void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t eventType) { in android_server_PowerManagerService_userActivity() argument
162 if (eventTime > now) { in android_server_PowerManagerService_userActivity()
163 eventTime = now; in android_server_PowerManagerService_userActivity()
166 if (gLastEventTime[eventType] + MIN_TIME_BETWEEN_USERACTIVITIES > eventTime) { in android_server_PowerManagerService_userActivity()
169 gLastEventTime[eventType] = eventTime; in android_server_PowerManagerService_userActivity()
179 nanoseconds_to_milliseconds(eventTime), eventType, 0); in android_server_PowerManagerService_userActivity()
/frameworks/native/libs/input/tests/
DInputPublisherAndConsumer_test.cpp84 constexpr nsecs_t eventTime = 4; in PublishAndConsumeKeyEvent() local
87 keyCode, scanCode, metaState, repeatCount, downTime, eventTime); in PublishAndConsumeKeyEvent()
114 EXPECT_EQ(eventTime, keyEvent->getEventTime()); in PublishAndConsumeKeyEvent()
151 constexpr nsecs_t eventTime = 4; in PublishAndConsumeMotionEvent() local
173 xOffset, yOffset, xPrecision, yPrecision, downTime, eventTime, pointerCount, in PublishAndConsumeMotionEvent()
203 EXPECT_EQ(eventTime, motionEvent->getEventTime()); in PublishAndConsumeMotionEvent()

123