Update Resampler_test.cpp to consider RESAMPLE_LATENCY
Updated Resampler_test.cpp to consider RESAMPLE_LATENCY because the
parameter was unused in Resampler.cpp
Bug: 297226446
Flag: EXEMPT refactor
Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST --gtest_filter="ResamplerTest*"
Change-Id: I965264e88bede4be74025f61bcd4ef8d235dc4c8
diff --git a/libs/input/Resampler.cpp b/libs/input/Resampler.cpp
index c663649..b535ff4 100644
--- a/libs/input/Resampler.cpp
+++ b/libs/input/Resampler.cpp
@@ -241,13 +241,15 @@
motionEvent.getId());
}
-void LegacyResampler::resampleMotionEvent(nanoseconds resampleTime, MotionEvent& motionEvent,
+void LegacyResampler::resampleMotionEvent(nanoseconds frameTime, MotionEvent& motionEvent,
const InputMessage* futureSample) {
if (mPreviousDeviceId && *mPreviousDeviceId != motionEvent.getDeviceId()) {
mLatestSamples.clear();
}
mPreviousDeviceId = motionEvent.getDeviceId();
+ const nanoseconds resampleTime = frameTime - RESAMPLE_LATENCY;
+
updateLatestSamples(motionEvent);
const std::optional<Sample> sample = (futureSample != nullptr)