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
Loading
Please register or sign in to comment