[automerger] Limit IsSeparateProfileChallengeAllowed to system callers am: 9061fcc46b am: 39f5432697
Change-Id: I064e17eb9e4a91cbf8cda5fe6ee37da48724634d
This commit is contained in:
@@ -3076,6 +3076,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSeparateProfileChallengeAllowed(int userHandle) {
|
public boolean isSeparateProfileChallengeAllowed(int userHandle) {
|
||||||
|
if (!isCallerWithSystemUid()) {
|
||||||
|
throw new SecurityException("Caller must be system");
|
||||||
|
}
|
||||||
ComponentName profileOwner = getProfileOwner(userHandle);
|
ComponentName profileOwner = getProfileOwner(userHandle);
|
||||||
// Profile challenge is supported on N or newer release.
|
// Profile challenge is supported on N or newer release.
|
||||||
return profileOwner != null &&
|
return profileOwner != null &&
|
||||||
|
|||||||
Reference in New Issue
Block a user