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

Skip to content
Commit 56ba8aa7 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Add multi-device checks to AccessibilityInputFilterInputTest

Prior to this CL, AccessibilityInputFilter assumed that only a single
input device could be active at a time. However, after the recent
multi-device input feature, that assumption no longer holds.

As a result, InputFilter is being sent multi-device streams from the
InputDispatcher. This is problematic, because InputFilter gets confused
and start processing the events from all devices at the same time.
Components like TouchExplorer don't look at the device id, and quickly
get into an inconsistent state.

This causes some events to be dropped by InputFilter, and some to be
sent back to the InputDispatcher. In some situations, this leads to an
inconsistent input stream being injected back into dispatcher, which
could lead to a crash.

In this CL, we add a multiplexer to AccessibilityInputFilter so that
only one input device can be active at a time. All MotionEvents from
other devices are going to be ignored.

Multi-device behaviour of AccessibilityInputFilter is also being tested
in this CL, for the cases where
none of the a11y features are on, and where all of the a11y features are
on.

Bug: 310014874
Test: atest FrameworksServicesTests:AccessibilityInputFilterInputTest
Change-Id: Iac18fd671787d880aca1f6fbfd17d822e5ae8ee6
parent 0ca9cb73
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment