Mark RotationLayer as trusted for untrusted touches

Its content is generated by the system (a snapshot of the screen IIUC,
please correct me if I'm wrong!) and the layer was originally
pass-through.

Touches are being blocked in some tests, which is causing breakages, so
reverting to the previous behavior for this layer, which is to let
touches pass through.

Bug: 176926757
Bug: 174269206
Bug: 158002302
Test: Rotate device, tap the screen frenetically during animation,
      observer no log from touches being blocked.
Change-Id: Iea970e6a4793dd991e2a666c04bb508d7fa240ed
diff --git a/services/core/java/com/android/server/wm/ScreenRotationAnimation.java b/services/core/java/com/android/server/wm/ScreenRotationAnimation.java
index 1a27b1b..533c82e 100644
--- a/services/core/java/com/android/server/wm/ScreenRotationAnimation.java
+++ b/services/core/java/com/android/server/wm/ScreenRotationAnimation.java
@@ -206,12 +206,17 @@
                     .setCallsite("ScreenRotationAnimation")
                     .build();
 
+            String name = "RotationLayer";
             mScreenshotLayer = displayContent.makeOverlay()
-                    .setName("RotationLayer")
+                    .setName(name)
                     .setBufferSize(mWidth, mHeight)
                     .setSecure(isSecure)
                     .setCallsite("ScreenRotationAnimation")
                     .build();
+            // This is the way to tell the input system to exclude this surface from occlusion
+            // detection since we don't have a window for it. We do this because this window is
+            // generated by the system as well as its content.
+            InputMonitor.setTrustedOverlayInputInfo(mScreenshotLayer, t, displayId, name);
 
             mEnterBlackFrameLayer = displayContent.makeOverlay()
                     .setName("EnterBlackFrameLayer")