Move CheckPermissionDelegate API into PermissionManagerServiceInternal.
Expose only start/stopShellPermissionIdentityDelegation() as API, because there won't be a use case for UIDs other than the shell UID. The caller checking is left in ActivityManagerService because only it knows info about the ongoing intrumentations. So this new system server API only delegates the permission identity of Shell to someone else, but checking who can start the delegation to whom is the responsibility of other parts of the system. For now the API only delegates permissions checks since app ops won't be updatable in this release, and it is a platform implementation detail that ActivityManagerService also delegates app op checks via the in platform AppOpsService interface at the same time. Once we complete moving AppOpsService, this API will start delegating for app ops (or whatever it will become) as well, and then the platform code can just drop the app op related code and call this API only. Platform code will have to drop those app op related code by then anyway since the internal app op interface will no longer be available after the move. Bug: 158736025 Test: presubmit Change-Id: I42839dacdf06e4d94682a46a0e692119de0bfdc0
Loading
Please register or sign in to comment