change VelocityTrackerImpl::addMovement's timestamp from millseconds to nanoseconds

This commit is contained in:
侯歌 2024-05-08 20:01:13 +08:00
parent 4dbc0eaf13
commit fb6d2005a7

View File

@ -298,7 +298,7 @@ void VelocityTrackerImpl::addMovement(const MotionEvent& event) {
const size_t historySize = event.getHistorySize();
for (size_t h = 0; h <= historySize; h++) {
const nsecs_t eventTime = event.getHistoricalEventTime(h);
const nsecs_t eventTime = event.getHistoricalEventTime(h)*NANOS_PER_MS;
for (size_t i = 0; i < event.getPointerCount(); i++) {
if (event.isResampled(i, h)) {
continue; // skip resampled samples