summaryrefslogtreecommitdiff
path: root/libs/input/Input.cpp
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2024-11-12 22:22:43 -0800
committer Xin Li <delphij@google.com> 2024-11-12 22:22:43 -0800
commit6dc15689f6bb4b04c102ac3107f31377ee91f05e (patch)
tree3ca9d372bc99ac1182fdb4bc895c556d0f108bd3 /libs/input/Input.cpp
parentd4d02798539f29d00059d458fd01e5b2869acbb6 (diff)
parentf151262626f1c08a104cc35d9864493ea8a72dec (diff)
Merge 24Q4 (ab/12406339) into aosp-main-future
Bug: 370570306 Merged-In: I9be1254c3e2685b0aa950b314c581824f40ce26c Change-Id: I35bc501a2b1d9eb100aaab25cd660cf2e0542f99
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()]);