Input: Override touchable region bounds with surface bounds 2/2
Take advantage of the surface flinger layer hierarchy to set touchable
region.
- Let a client set a surface touchable region to its own bounds.
- Let a client set a surface touchable region to another surface bounds.
- Let a client bound its touchable region to a surface.
Test: go/wm-smoke
Test: existing tests
Change-Id: I447c93353d067a296007ba8f8341d2420b941d71
diff --git a/include/input/InputWindow.h b/include/input/InputWindow.h
index a065a4c..916af69 100644
--- a/include/input/InputWindow.h
+++ b/include/input/InputWindow.h
@@ -116,7 +116,7 @@
INPUT_FEATURE_NO_INPUT_CHANNEL = 0x00000002,
INPUT_FEATURE_DISABLE_USER_ACTIVITY = 0x00000004,
};
-
+
/* These values are filled in by the WM and passed through SurfaceFlinger
* unless specified otherwise.
*/
@@ -165,6 +165,8 @@
int32_t displayId;
int32_t portalToDisplayId = ADISPLAY_ID_NONE;
InputApplicationInfo applicationInfo;
+ bool replaceTouchableRegionWithCrop;
+ wp<IBinder> touchableRegionCropHandle;
void addTouchableRegion(const Rect& region);