[automerger] Limit IsSeparateProfileChallengeAllowed to system callers am: 9061fcc46b am: 39f5432697 am: 9c0bc5405e

Change-Id: If32bb0948a2b9aa67b99ceae0ed9234f570198bf
This commit is contained in:
Android Build Merger (Role)
2019-04-10 12:43:56 +00:00

View File

@@ -3100,6 +3100,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
@Override
public boolean isSeparateProfileChallengeAllowed(int userHandle) {
if (!isCallerWithSystemUid()) {
throw new SecurityException("Caller must be system");
}
ComponentName profileOwner = getProfileOwner(userHandle);
// Profile challenge is supported on N or newer release.
return profileOwner != null &&