Merge "Fix security vulnerability in DPMS" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
209f21d2ae
@@ -13112,6 +13112,10 @@ public class DevicePolicyManager {
|
||||
* @see #getCrossProfileCalendarPackages(ComponentName)
|
||||
* @hide
|
||||
*/
|
||||
@RequiresPermission(anyOf = {
|
||||
permission.INTERACT_ACROSS_USERS_FULL,
|
||||
permission.INTERACT_ACROSS_USERS
|
||||
})
|
||||
public @Nullable Set<String> getCrossProfileCalendarPackages() {
|
||||
throwIfParentInstance("getCrossProfileCalendarPackages");
|
||||
if (mService != null) {
|
||||
|
||||
@@ -16016,9 +16016,9 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId");
|
||||
|
||||
final CallerIdentity caller = getCallerIdentity();
|
||||
Preconditions.checkCallAuthorization(hasCrossUsersPermission(caller, userHandle));
|
||||
Preconditions.checkCallAuthorization(
|
||||
hasCallingOrSelfPermission(permission.INTERACT_ACROSS_USERS)
|
||||
|| hasCallingOrSelfPermission(permission.INTERACT_ACROSS_USERS_FULL));
|
||||
|
||||
synchronized (getLockObject()) {
|
||||
final ActiveAdmin admin = getProfileOwnerAdminLocked(userHandle);
|
||||
|
||||
Reference in New Issue
Block a user