Merge "Allow touch regions beyond layers from task managers" into udc-dev

This commit is contained in:
Garfield Tan
2023-03-23 00:29:40 +00:00
committed by Android (Google) Code Review

View File

@@ -8703,7 +8703,13 @@ public class WindowManagerService extends IWindowManager.Stub
} else {
h.touchableRegion.set(region);
h.replaceTouchableRegionWithCrop = false;
h.setTouchableRegionCrop(surface);
// Task managers may need to receive input events around task layers to resize tasks.
final int permissionResult = mContext.checkPermission(
permission.MANAGE_ACTIVITY_TASKS, callingPid, callingUid);
if (permissionResult != PackageManager.PERMISSION_GRANTED) {
h.setTouchableRegionCrop(surface);
}
}
final SurfaceControl.Transaction t = mTransactionFactory.get();