summaryrefslogtreecommitdiff
path: root/libs/input/Input.cpp
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2024-12-13 11:15:16 -0800
committer Xin Li <delphij@google.com> 2024-12-13 11:15:16 -0800
commit2cb09d0f6045c1b0f20ec8045053195f88563bc0 (patch)
treea5daa8a1392d6223c17b604ca3672f647fa5dede /libs/input/Input.cpp
parenta3ff6f6ba4aaec8111f9309b3c0b655c8ef35a4d (diff)
parent52507b4b1670ea3e3a4061f1aedcbeff5c2e2970 (diff)
Merge 24Q4 into AOSP main
Bug: 370570306 Merged-In: I5ed05d0f5aa4c5e98fbd9b5275f3db39ccb76fed Change-Id: I039103d5231a77496213df3ede1fa5b1dd259a8d
Diffstat (limited to 'libs/input/Input.cpp')
-rw-r--r--libs/input/Input.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp
index b09814797f..a2bb3453fe 100644
--- a/libs/input/Input.cpp
+++ b/libs/input/Input.cpp
@@ -580,7 +580,7 @@ void MotionEvent::initialize(int32_t id, int32_t deviceId, uint32_t source,
&pointerProperties[pointerCount]);
mSampleEventTimes.clear();
mSamplePointerCoords.clear();
- addSample(eventTime, pointerCoords);
+ addSample(eventTime, pointerCoords, mId);
}
void MotionEvent::copyFrom(const MotionEvent* other, bool keepHistory) {
@@ -640,9 +640,9 @@ void MotionEvent::splitFrom(const android::MotionEvent& other,
mSampleEventTimes = other.mSampleEventTimes;
}
-void MotionEvent::addSample(
- int64_t eventTime,
- const PointerCoords* pointerCoords) {
+void MotionEvent::addSample(int64_t eventTime, const PointerCoords* pointerCoords,
+ int32_t eventId) {
+ mId = eventId;
mSampleEventTimes.push_back(eventTime);
mSamplePointerCoords.insert(mSamplePointerCoords.end(), &pointerCoords[0],
&pointerCoords[getPointerCount()]);