Replace client token with a new token in InputWindowHandle

The tokens are used to map input data to its window and its channel. Currently InputWindowHandle
tokens uses the client IWindow binder token if the input is associated with a client window or a
newly generated token for temporary surfaces (drag input surface), and windowless surfaces.

These tokens are also used to send policy related events. From the token, it is not obvious what
the token represents for which component. This is a cleanup cl that removes the use of client before adding an explicit token for handling policy related events.
One use case of client token was to support pointer capture but this will move to using
the input channel socket.

Removing the client token allows windows to share its input token with other processes to enable
features like transfer focus without leaking the client token.

Bug: 134365580
Test: go/wm-smoke
Test: atest PointerCaptureTest WindowFocusTests

Change-Id: I49e4c54d977f98e855af9e7ed54443588fdb66c9
diff --git a/services/core/java/com/android/server/wm/TaskPositioner.java b/services/core/java/com/android/server/wm/TaskPositioner.java
index b680fa4..478b1b5 100644
--- a/services/core/java/com/android/server/wm/TaskPositioner.java
+++ b/services/core/java/com/android/server/wm/TaskPositioner.java
@@ -256,7 +256,7 @@
         final InputChannel[] channels = InputChannel.openInputChannelPair(TAG);
         mServerChannel = channels[0];
         mClientChannel = channels[1];
-        mService.mInputManager.registerInputChannel(mServerChannel, null);
+        mService.mInputManager.registerInputChannel(mServerChannel);
 
         mInputEventReceiver = new WindowPositionerEventReceiver(
                 mClientChannel, mService.mAnimationHandler.getLooper(),
@@ -267,8 +267,7 @@
         mDragApplicationHandle.dispatchingTimeoutNanos =
                 WindowManagerService.DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS;
 
-        mDragWindowHandle = new InputWindowHandle(mDragApplicationHandle, null,
-                display.getDisplayId());
+        mDragWindowHandle = new InputWindowHandle(mDragApplicationHandle, display.getDisplayId());
         mDragWindowHandle.name = TAG;
         mDragWindowHandle.token = mServerChannel.getToken();
         mDragWindowHandle.layer = mService.getDragLayerLocked();