summaryrefslogtreecommitdiff
path: root/libs/gui/ISurfaceComposer.cpp
diff options
context:
space:
mode:
author Prabir Pradhan <prabirmsp@google.com> 2024-06-04 02:59:40 +0000
committer Prabir Pradhan <prabirmsp@google.com> 2024-06-10 19:56:17 +0000
commit9a53b55af5228baef78a965d191dec83310009dc (patch)
tree12d7c92a238bab9b242251510b6c6ff3e9c9c7fc /libs/gui/ISurfaceComposer.cpp
parent9ddc39d87e94828c3b2106eb19514f9325e12590 (diff)
MotionEvent: Differentiate directional support for AXIS_ORIENTATION
We have three cases for handling AXIS_ORIENTATION: 1. Orientation is not supported by the input device, so the value for AXIS_ORIENTATION should always be 0, regardless of display rotation. 2. Orientation is supported, but a "direction" is not specified, like for touchscreens and touchpads. The orientation must be in the range [-pi/2, pi/2] for all display rotations. 3. Orientation is fully supported, and the value is in the range [-pi, pi] for all display rotations. It is insufficient to rely on whether or not the PointerCoords has the bit for AXIS_ORIENTATION set to determine whether the event has a valid orientation. This is because we always skip setting values of 0 for any axis in PointerCoords to save space during serialization. To support these three cases, we introduce two new MotionEvent private flags. These are flags that are not exposed to Java and to the public APIs. Bug: 263310669 Test: atest TouchScreenTest libinput_tests inputflinger_tests Change-Id: Iaa38afe35b00de74fbc5eefce25191bea52c2ea6
Diffstat (limited to 'libs/gui/ISurfaceComposer.cpp')
0 files changed, 0 insertions, 0 deletions