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

Skip to content
Commit 6573583a authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Allow stylus events in PalmRejector

After some recent changes, the touchscreen input device has source that
is a combination of SOURCE_TOUCHSCREEN and SOURCE_STYLUS.

Before this CL, this source is rejected, and therefore palm rejection
feature is not enabled.

With this CL, any source that has SOURCE_TOUCHSCREEN is allowed. That
also means that we potentially would invoke the model for stylus events,
especially if simultaneous touch and stylus are enabled.

The model, however, was never trained on stylus, and is not designed to
work with it. In preparation to upcoming simultaneous touch+stylus
feature, in this CL we also remove the stylus pointers before sending
the data to the model.

The only case where we need to be careful is pointer-down and pointer-up
events with stylus. In this CL, we drop these events, which should be a
no-op from the palm rejection model's perpective.

Bug: 241935838
Test: atest libpalmrejection_test inputflinger_tests
Change-Id: I760207a82807e03802e72a318fca8b97a4fd7a24
parent e491fb5a
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