summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2023-12-28 17:34:50 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-12-28 17:34:50 +0000
commit22ac12b228bfda8b55aaee05381c36acad7a296b (patch)
tree3d7e05b74f914e938213a045b5503c4651f0d731
parente88ab06136a0d72cbc3b7bb90594746e5e5ba1cb (diff)
parentb32ea72cf741cbfca72a1bf0b0ebb2ebb3e3b6e1 (diff)
Merge "Only prune non-pointer events" into main
-rw-r--r--services/inputflinger/dispatcher/InputDispatcher.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp
index f2612cf92d..06645a129b 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.cpp
+++ b/services/inputflinger/dispatcher/InputDispatcher.cpp
@@ -1058,7 +1058,10 @@ void InputDispatcher::dispatchOnceInnerLocked(nsecs_t* nextWakeupTime) {
dropReason = DropReason::STALE;
}
if (dropReason == DropReason::NOT_DROPPED && mNextUnblockedEvent) {
- dropReason = DropReason::BLOCKED;
+ if (!isFromSource(motionEntry->source, AINPUT_SOURCE_CLASS_POINTER)) {
+ // Only drop events that are focus-dispatched.
+ dropReason = DropReason::BLOCKED;
+ }
}
done = dispatchMotionLocked(currentTime, motionEntry, &dropReason, nextWakeupTime);
break;