Added input support for cloned layers

This was done with a few changes:
1. Added a layerId in the input info so the InputInfo objects can be
uniquely identified as per layer
2. When setting input info in InputDispatcher, compare InputInfo objects
using layer id instead of input token.
3. Updated the crop region for layers based on the cloned hierarchy so
the input is cropped to the correct region.

Bug: 140756730
Test: InputDispatcherMultiWindowSameTokenTests

Change-Id: I980f5d29d091fecb407f5cd6a289615505800927
diff --git a/include/input/InputWindow.h b/include/input/InputWindow.h
index f852cd0..cbd64d5 100644
--- a/include/input/InputWindow.h
+++ b/include/input/InputWindow.h
@@ -119,7 +119,11 @@
     /* These values are filled in by the WM and passed through SurfaceFlinger
      * unless specified otherwise.
      */
+    // This value should NOT be used to uniquely identify the window. There may be different
+    // input windows that have the same token.
     sp<IBinder> token;
+    // This uniquely identifies the input window.
+    int32_t id = 0;
     std::string name;
     int32_t layoutParamsFlags;
     int32_t layoutParamsType;
@@ -203,6 +207,8 @@
 
     sp<IBinder> getToken() const;
 
+    int32_t getId() const { return mInfo.id; }
+
     sp<IBinder> getApplicationToken() {
         return mInfo.applicationInfo.token;
     }