Add basic ANR test

To reduce the delta of the upcoming ANR refactor, add a basic ANR test
here. This will also help highlight the difference in behaviour from the
current code to the new code.

To cause an ANR today, the socket needs to be blocked, which means that
we need to send ~ 50 events to the unresponsive window.

These workarounds will be removed when the ANRs are refactored.

Bug: 143459140
Test: adb shell -t /data/nativetest64/inputflinger_tests/inputflinger_tests --gtest_filter="*InputDispatcherSingleWindowAnr*" --gtest_repeat=1000
--gtest_break_on_failure

Change-Id: I0a1b28c2785d03d8870691641e0f7c6b1ca3b85e
7 files changed