commit | 27fc9f1fb7d447f17335da2b5bac186d0b1fcffc | [log] [tgz] |
---|---|---|
author | Siarhei Vishniakou <svv@google.com> | Sat Jul 13 23:59:47 2024 -0700 |
committer | Siarhei Vishniakou <svv@google.com> | Tue Jul 16 05:54:27 2024 +0000 |
tree | 86c5b3edbfd67b0d9da8c5063e808db14f4752b1 | |
parent | fc4d8c6035d22fdb0c09a317df5aa6625735ec26 [diff] [blame] |
Handle non-split pointers for multi-device case During multi-device event stream, tempTouchState will already contain some pointers from another case. When the second device becomes active and tries to add pointers to a non-splitting window, we should not be marking that pointer as going to the second window unless it's already receiving pointers for that device. Fixes: 341869464 Flag: EXEMPT bugfix Test: TEST=inputflinger_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:962044645a27baaaf9d7736f76c6c252aa82c419) Merged-In: Ia295c1d9d941383792e90a3d6fd981473af8f015 Change-Id: Ia295c1d9d941383792e90a3d6fd981473af8f015
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp index a76271d..f9fbfef 100644 --- a/services/inputflinger/dispatcher/InputDispatcher.cpp +++ b/services/inputflinger/dispatcher/InputDispatcher.cpp
@@ -2705,6 +2705,9 @@ if (mDragState && mDragState->dragWindow == touchedWindow.windowHandle) { continue; } + if (!touchedWindow.hasTouchingPointers(entry.deviceId)) { + continue; + } touchedWindow.addTouchingPointers(entry.deviceId, touchingPointers); } }