Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8e6ce224 authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

Fix input injection with zero coords

In the native MotionEvent class, setting an axis value to 0 is
equivalent to removing the axis from the bitfield of valid axes. This is
because getting an axis value that is not set in the bitfield will
return 0 by default.

This means that we cannot rely on the bitfield of valid axes to know
exactly which axes are valid, since all axes are always valid with a
default value of 0.

Rather than transforming only the axies that are set in the bitfield, we
add a helper function to MotionEvent to transform the entire
PointerCoords.

Bug: 219711163
Test: manual, see bug: adb shell input draganddrop 665 531 0 531 1000
Change-Id: I335beebf8263a38f180f2f4c6a788fbd69d15a6f
Merged-In: I335beebf8263a38f180f2f4c6a788fbd69d15a6f
(cherry picked from commit 890532e4)
parent e73b8065
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment