Fix clearDeviceOwner() not working in split-user mode
Bug: 25906481 Change-Id: Iefe004b4bac7a7fc79c613e61a42f916fce7230e
This commit is contained in:
@@ -5530,7 +5530,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
|
||||
Preconditions.checkNotNull(packageName, "packageName is null");
|
||||
final int callingUid = mInjector.binderGetCallingUid();
|
||||
try {
|
||||
int uid = mContext.getPackageManager().getPackageUidAsUser(packageName, 0);
|
||||
int uid = mContext.getPackageManager().getPackageUidAsUser(packageName,
|
||||
UserHandle.getUserId(callingUid));
|
||||
if (uid != callingUid) {
|
||||
throw new SecurityException("Invalid packageName");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user