Add ability to cancel ANR dialogs

Currently, ActivityManager doesn't know whether an app has become
responsive. Notify it about a responsive connection so that it can hide
the ANR dialog.

Bug: 171218828
Test: manual test with an unresponsive app
Test: atest AnrTest
Test: logcatcolor | grep -i windowmanager and observe the logs from WM
about ANR happening and ANR stopping.

Change-Id: Ie950015e5794232f1c59c2c7b3101723fcaf5a46
8 files changed