Give new permission to set cross-profile app-op to ManagedProvisioning
This is required for the provisioning cross-profile consent screen which is used to take some apps off INTERACT_ACROSS_USERS. Hidden API CrossProfileApps#setInteractAcrossProfilesAppOp is changed from requiring the broad app-op permissions to requiring CONFIGURE_INTERACT_ACROSS_PROFILES. It then clears identity before calling into AppOpsManager. For convenience, we also allow apps (such as Settings) with the broader app-op permissions to continue to call this method; in that case, we simply don't clear the identity and let AppOpsManager check the permissions (so we allow AppOpsManager to set the requirements if you don't have the new CONFIGURE_INTERACT_ACROSS_PROFILES). The CL also adds 'withCleanCallingIdentity' support to CrossProfileAppsServiceImpl and moves over existing calls. Bug: 136249261 Bug: 140728653 Test: atest --verbose com.android.managedprovisioning.provisioning.crossprofile.CrossProfileConsentActivityRoboTest Change-Id: Ibd304563dd1ef5f16784e3502be5ef1ec4675b63
Loading
Please register or sign in to comment