Do not resample when frameTime is not available
LegacyResampler still resamples MotionEvents even when requestedFrameTime is std::nullopt. The problem is that if the parameter requestedFrameTime is std::nullopt, it is reassigned inside consumeBatchedInputEvents to std::numeric_limits<nsecs_t>::max(). In spite of using max() as a placeholder to indicate that everything should be consumed, it is still a valid time, and resampler uses it to resample MotionEvent. To fix this issue, having a valid requestedFrameTime should also be a condition to resample MotionEvents. Bug: 374375203 Flag: EXEMPT refactor Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST Change-Id: I6e53bdd0a35d359da8b50f10dd4aad9bddc8aa3f
Loading
Please register or sign in to comment