Add tests for pointer stuck in TouchState
Add two tests that reproduce the conditions necessary for the pointer to be stuck inside TouchState. In both cases, this is caused by calling synthesizeCancelationEventsForConnectionLocked without also changing the TouchState. That makes TouchState and InputState out of sync. Currently, this setup does not cause a crash, but rather, just drops some of the touches unexpectedly. These tests are added as documentation of the current behaviour. When the situation is fixed in the future, the tests would need to be updated. If we wanted the tests to fail, we could crash the dispatcher whenever InputState detects an inconsistent stream. A similar solution will be done eventually by enabling the InputVerifier for all outgoing streams. Bug: 281806933 Test: m inputflinger_tests && adb sync data && adb shell -t data/nativetest64/inputflinger_tests/inputflinger_tests Change-Id: Iaa949f2aa8dd2a7db9e8fd8bb365430e805cda79
Loading
Please register or sign in to comment