Split monitor and window ANR notification paths

Currently, both monitors and windows share the same ANR notification
paths. This means that InputManagerService must be the one to determine
whether the ANR event belongs to a monitor or to a window.

We previously kept track of this by recording the pid inside
InputManagerService. However, there seems to be a path where the gesture
monitor process dies that does not lead to a notification of the java
layer. This resulted in having multiple registered processes.

Now, we will rely on the native layer to manage the pid and to notify
the java layer appropriately.

Bug: 175593831
Test: atest inputflinger_tests
Change-Id: Ie1f7e976dcadcf07a83f78b3ca856b5c43096e2f
6 files changed