Limit IsSeparateProfileChallengeAllowed to system callers am: 1b6301cf24

am: 406229f0c8

Change-Id: Ibcdd009840f36c0ac566a2211a50ac75f6db5c28
This commit is contained in:
Pavel Grafov
2019-04-10 12:20:17 -07:00
committed by android-build-merger

View File

@@ -4096,6 +4096,9 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
@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 &&