diff options
| author | 2023-05-16 18:22:05 +0000 | |
|---|---|---|
| committer | 2023-05-16 18:22:05 +0000 | |
| commit | 283144f2260c266c4787d8d2b4d5cfa7b92c577f (patch) | |
| tree | 6349a45e9ab9c07b4b8335e2c0bf8fddac52d13e | |
| parent | 00f6f92278139ad1bbe55d02713a3a8eed86ad91 (diff) | |
| parent | 585bc6638380ce3b0f430483a1d11de0ea69fca3 (diff) | |
Merge "Set cursor position to the first pointer for mouse events" into udc-dev am: 585bc66383
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/23249461
Change-Id: If9cb197cf7848b82fdd477c5da931110f102108a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | services/inputflinger/tests/InputDispatcher_test.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/services/inputflinger/tests/InputDispatcher_test.cpp b/services/inputflinger/tests/InputDispatcher_test.cpp index fecd0d1315..3f2658a71d 100644 --- a/services/inputflinger/tests/InputDispatcher_test.cpp +++ b/services/inputflinger/tests/InputDispatcher_test.cpp @@ -1564,8 +1564,7 @@ public: // Set mouse cursor position for the most common cases to avoid boilerplate. if (mSource == AINPUT_SOURCE_MOUSE && - !MotionEvent::isValidCursorPosition(mRawXCursorPosition, mRawYCursorPosition) && - mPointers.size() == 1) { + !MotionEvent::isValidCursorPosition(mRawXCursorPosition, mRawYCursorPosition)) { mRawXCursorPosition = pointerCoords[0].getX(); mRawYCursorPosition = pointerCoords[0].getY(); } @@ -1677,8 +1676,7 @@ public: // Set mouse cursor position for the most common cases to avoid boilerplate. if (mSource == AINPUT_SOURCE_MOUSE && - !MotionEvent::isValidCursorPosition(mRawXCursorPosition, mRawYCursorPosition) && - mPointers.size() == 1) { + !MotionEvent::isValidCursorPosition(mRawXCursorPosition, mRawYCursorPosition)) { mRawXCursorPosition = pointerCoords[0].getX(); mRawYCursorPosition = pointerCoords[0].getY(); } |