Merge "Allow touch regions beyond layers from task managers" into udc-dev am: 33f5312f1f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21995791

Change-Id: I2809beedb24e502b8dd1f379989e2e040ddbd019
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Garfield Tan
2023-03-23 00:44:15 +00:00
committed by Automerger Merge Worker

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();