Correctly blame ANR on process using another process token

Activities can give their window tokens to other process to add
windows with. E.g. -1 screen on launcher. We were in correctly
blaming the process that gave out its token when an ANR occurs
because we were looking at the process associated with the activity.
This CL fixes that.

Test: manual
Change-Id: I08fca00d12ab89dc27eb104115fd375bb4e8ec66
Fixes: 36730136
diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java
index d041c11..aae216e 100644
--- a/services/core/java/com/android/server/wm/InputMonitor.java
+++ b/services/core/java/com/android/server/wm/InputMonitor.java
@@ -258,7 +258,8 @@
             // Notify the activity manager about the timeout and let it decide whether
             // to abort dispatching or keep waiting.
             final AppWindowContainerController controller = appWindowToken.getController();
-            final boolean abort = controller != null && controller.keyDispatchingTimedOut(reason);
+            final boolean abort = controller != null
+                    && controller.keyDispatchingTimedOut(reason, windowState.mSession.mPid);
             if (!abort) {
                 // The activity manager declined to abort dispatching.
                 // Wait a bit longer and timeout again later.
@@ -281,7 +282,7 @@
         return 0; // abort dispatching
     }
 
-    void addInputWindowHandle(final InputWindowHandle windowHandle) {
+    private void addInputWindowHandle(final InputWindowHandle windowHandle) {
         if (mInputWindowHandles == null) {
             mInputWindowHandles = new InputWindowHandle[16];
         }