Input: Handle parent surface crops 2/2

- Surface Insets are set to offset the client content and draw a border around the client surface
  (such as shadows in dialogs). Inputs sent to the client are offset such that 0,0 is the start
  of the client content.  When accounting for surface insets, check if the surface is already
  cropped by a parent so that the input offset is not set twice.
- Restrict the touchable region to the input frame bounds.

Test: Open event in calendar. Try to close the event. The event is a dialog and draws shadows.
Test: Open app selector in secondary split screen. Ensure input does not go to primary split screen

Bug: 120413463, 120460606
Change-Id: I518c52539cb72f3cf7207c47b9d25964c4737ec5
(cherry picked from commit 8290ee096e39560f54dd788368a8bf14d308675a)
diff --git a/services/core/java/com/android/server/wm/ b/services/core/java/com/android/server/wm/
index ad43e74..5cc3623 100644
--- a/services/core/java/com/android/server/wm/
+++ b/services/core/java/com/android/server/wm/
@@ -2174,9 +2174,6 @@
-        // The area containing the shadows is not touchable.
-        region.translate(mAttrs.surfaceInsets.left,;
         return flags;