Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b68bad0 authored by Pavel Grafov's avatar Pavel Grafov Committed by android-build-merger
Browse files

Limit IsSeparateProfileChallengeAllowed to system callers am: 1b6301cf

am: 406229f0

Change-Id: Ibcdd009840f36c0ac566a2211a50ac75f6db5c28
parents 71d8e5ff 406229f0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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 &&