diff options
| author | 2023-12-28 18:10:10 +0000 | |
|---|---|---|
| committer | 2023-12-28 18:10:10 +0000 | |
| commit | 9d3866046b77934acf4fcf30f685c81f1c9bfeca (patch) | |
| tree | 3bf7c0ff0b83814215e403ff534812925fc9ebba | |
| parent | 3493398f04c117fbbbbf574809e8e10e5b3ed079 (diff) | |
| parent | d47a3d31123118f28ad6b05be0ebf9707601a634 (diff) | |
Merge "Cancel only the gesture corresponding to the dropped event" into main am: e88ab06136 am: 9135057510 am: d47a3d3112
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2890872
Change-Id: I2252e197dc2f3cc8d31b1aa82e021cd01560e9e8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | services/inputflinger/dispatcher/InputDispatcher.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp index 768ed82e3b..ab815ea3ed 100644 --- a/services/inputflinger/dispatcher/InputDispatcher.cpp +++ b/services/inputflinger/dispatcher/InputDispatcher.cpp @@ -1418,6 +1418,9 @@ void InputDispatcher::dropInboundEventLocked(const EventEntry& entry, DropReason switch (entry.type) { case EventEntry::Type::KEY: { CancelationOptions options(CancelationOptions::Mode::CANCEL_NON_POINTER_EVENTS, reason); + const KeyEntry& keyEntry = static_cast<const KeyEntry&>(entry); + options.displayId = keyEntry.displayId; + options.deviceId = keyEntry.deviceId; synthesizeCancelationEventsForAllConnectionsLocked(options); break; } @@ -1425,10 +1428,14 @@ void InputDispatcher::dropInboundEventLocked(const EventEntry& entry, DropReason const MotionEntry& motionEntry = static_cast<const MotionEntry&>(entry); if (motionEntry.source & AINPUT_SOURCE_CLASS_POINTER) { CancelationOptions options(CancelationOptions::Mode::CANCEL_POINTER_EVENTS, reason); + options.displayId = motionEntry.displayId; + options.deviceId = motionEntry.deviceId; synthesizeCancelationEventsForAllConnectionsLocked(options); } else { CancelationOptions options(CancelationOptions::Mode::CANCEL_NON_POINTER_EVENTS, reason); + options.displayId = motionEntry.displayId; + options.deviceId = motionEntry.deviceId; synthesizeCancelationEventsForAllConnectionsLocked(options); } break; |