summaryrefslogtreecommitdiff
path: root/libs/input/InputConsumerNoResampling.cpp
diff options
context:
space:
mode:
author jioana <jioana@google.com> 2024-07-16 15:42:56 +0000
committer Ioana Jianu <jioana@google.com> 2024-07-18 09:20:45 +0000
commit71c6f73ada569787a7064af4ea2a4c01adb75a85 (patch)
treee47fc67150f1f48bd7f20c80d417898f3884b576 /libs/input/InputConsumerNoResampling.cpp
parent41750190227be028706594a3e0544022b32b92b3 (diff)
Update MotionEvent's id when a new sample is added.
Until now the MotionEvent's id was set during the "initialize" call, and it was equal to the first sample's eventId. We want to use the latest sample's eventId. Bug: b/350907221 Test: atest libinput_tests inputflinger_tests Flag: EXEMPT bugfix Change-Id: I0d967e7fe644fc2b2c09d044c3ee8ed13276d787
Diffstat (limited to 'libs/input/InputConsumerNoResampling.cpp')
-rw-r--r--libs/input/InputConsumerNoResampling.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/input/InputConsumerNoResampling.cpp b/libs/input/InputConsumerNoResampling.cpp
index da494b5ba3..c145d5c286 100644
--- a/libs/input/InputConsumerNoResampling.cpp
+++ b/libs/input/InputConsumerNoResampling.cpp
@@ -114,7 +114,7 @@ void addSample(MotionEvent& event, const InputMessage& msg) {
// TODO(b/329770983): figure out if it's safe to combine events with mismatching metaState
event.setMetaState(event.getMetaState() | msg.body.motion.metaState);
- event.addSample(msg.body.motion.eventTime, pointerCoords.data());
+ event.addSample(msg.body.motion.eventTime, pointerCoords.data(), msg.body.motion.eventId);
}
std::unique_ptr<TouchModeEvent> createTouchModeEvent(const InputMessage& msg) {