[automerger] Limit IsSeparateProfileChallengeAllowed to system callers am: 9061fcc46b am: 39f5432697 am: 9c0bc5405e am: 55209aca88
Change-Id: I9f56349020376c4cb459597bf01cb4956344f7a8
This commit is contained in:
@@ -3155,6 +3155,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