InputManagerService - call PermissionEnforcer helper on methods annotated with @EnforcePermission

All ava methods annotated with @EnforcePermission
must call super.<methodName>_enforcePermission
method provided by PermissionEnforcer.

This required by the @EnforcePermission annotation, but is currently a
no-op, and will be switched on with ag/20325484.

This CL migrates incremental additions made since the original LSC
ag/20189550.

Bug: 234083358
Test: TH
Change-Id: I39a8583c4732b3d01de47b78955c3b8cff853f82
This commit is contained in:
mattgilbride
2022-11-13 18:48:07 +00:00
parent 14fed442be
commit 9237e8e883

View File

@@ -2685,6 +2685,8 @@ public class InputManagerService extends IInputManager.Stub
@EnforcePermission(Manifest.permission.MONITOR_INPUT)
@Override
public void pilferPointers(IBinder inputChannelToken) {
super.pilferPointers_enforcePermission();
Objects.requireNonNull(inputChannelToken);
mNative.pilferPointers(inputChannelToken);
}