Throw SecurityException when an admin uses the
setUserRestrictionGlobally method. Test: btest CtsDevicePolicyTestCases Fixes: 278772650 Change-Id: Id230f8b179df79b62bc8a85ed50e18dede8a298e
This commit is contained in:
@@ -13376,7 +13376,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
|
||||
throw new IllegalStateException("Feature flag is not enabled.");
|
||||
}
|
||||
if (isDeviceOwner(caller) || isProfileOwner(caller)) {
|
||||
throw new IllegalStateException("Admins are not allowed to call this API.");
|
||||
throw new SecurityException("Admins are not allowed to call this API.");
|
||||
}
|
||||
if (!mInjector.isChangeEnabled(
|
||||
ENABLE_COEXISTENCE_CHANGE, callerPackage, caller.getUserId())) {
|
||||
|
||||
Reference in New Issue
Block a user