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

Skip to content
Commit 869b89d2 authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

TouchInputMapper: Disable PointerUsage concept with a flag

Introduce a flag to disable the concept of PointerUsage.

TouchInputMapper's POINTER mode was split into several "usages",
including GESTURES, STYLUS, and MOUSE. These sub-modes were used to
process touchpad gestures, drawing tablets, and absolute mice,
respectively.

Now that we no longer use TouchInputMapper for touchpad gestures, we can
safely remove the special processing code for POINTER mode. Most of the
special processing in the POINTER mode pipeline was specific to the
GESTURES usage - for processing touchpad gestures. Without the need for
touchpad gesture processing in TouchInputMapper, the rest of what was
covered by this mode (e.g. the STYLUS and MOUSE usages) can share the
same code as DIRECT mode, since it isn't handling many special cases.
The PointerChoreographer refactor also made it so that POINTER mode no
longer needed to explicitly control mouse/stylus icons on the screen.

After this change, drawing tablets and absolute mice will share the
same code as touchscreens and styluses, so the forked code branches
are unified.

One special case for absolute mouse that was being handled by the
PointerUsage branch was that a mouse is aways hovering unless a mouse
button is pressed. We now account for this special case while cooking
the pointer state.

Bug: 281840344
Bug: 387529073
Bug: 257078296
Test: inputflinger_tests, DrawingTabletTest, AbsoluteMouseTest
Flag: com.android.input.flags.disable_touch_input_mapper_pointer_usage
Change-Id: Icfe99a5948d798a8f26798197e065d519eda693b
parent 5ce9acdf
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