Add missing check in getKeyguardDisabledFeature
Add check that if admin package is specified, it belong to the calling
admin.
Bug: 193663287
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest
#testSetKeyguardDisabledFeatures
atest com.android.cts.devicepolicy.MixedProfileOwnerTest
#testSetKeyguardDisabledFeatures
atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest
#testSetKeyguardDisabledFeatures
atest ManagedProfileTest#testDevicePolicyManagerParentSupport
Change-Id: I107d8705e3a65707ae5744e7705a4d32629c3c14
This commit is contained in:
@@ -8243,6 +8243,9 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
||||
|
||||
final CallerIdentity caller = getCallerIdentity();
|
||||
Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle));
|
||||
Preconditions.checkCallAuthorization(
|
||||
who == null || isCallingFromPackage(who.getPackageName(), caller.getUid())
|
||||
|| isSystemUid(caller));
|
||||
|
||||
final long ident = mInjector.binderClearCallingIdentity();
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user