Merge "Fix security vulnerability in DPMS" into sc-dev am: 209f21d2ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14881810 Change-Id: Icd65a15266764566d6c6b869b665b4cd4eea6e5d
This commit is contained in:
@@ -13112,6 +13112,10 @@ public class DevicePolicyManager {
|
|||||||
* @see #getCrossProfileCalendarPackages(ComponentName)
|
* @see #getCrossProfileCalendarPackages(ComponentName)
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
|
@RequiresPermission(anyOf = {
|
||||||
|
permission.INTERACT_ACROSS_USERS_FULL,
|
||||||
|
permission.INTERACT_ACROSS_USERS
|
||||||
|
})
|
||||||
public @Nullable Set<String> getCrossProfileCalendarPackages() {
|
public @Nullable Set<String> getCrossProfileCalendarPackages() {
|
||||||
throwIfParentInstance("getCrossProfileCalendarPackages");
|
throwIfParentInstance("getCrossProfileCalendarPackages");
|
||||||
if (mService != null) {
|
if (mService != null) {
|
||||||
|
|||||||
@@ -16016,9 +16016,9 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
|||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId");
|
Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId");
|
||||||
|
Preconditions.checkCallAuthorization(
|
||||||
final CallerIdentity caller = getCallerIdentity();
|
hasCallingOrSelfPermission(permission.INTERACT_ACROSS_USERS)
|
||||||
Preconditions.checkCallAuthorization(hasCrossUsersPermission(caller, userHandle));
|
|| hasCallingOrSelfPermission(permission.INTERACT_ACROSS_USERS_FULL));
|
||||||
|
|
||||||
synchronized (getLockObject()) {
|
synchronized (getLockObject()) {
|
||||||
final ActiveAdmin admin = getProfileOwnerAdminLocked(userHandle);
|
final ActiveAdmin admin = getProfileOwnerAdminLocked(userHandle);
|
||||||
|
|||||||
Reference in New Issue
Block a user