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

Commit 406229f0 authored by Pavel Grafov's avatar Pavel Grafov Committed by android-build-merger
Browse files

Limit IsSeparateProfileChallengeAllowed to system callers

am: 1b6301cf

Change-Id: I1145186590622d415c6c10c4750cf9429806bdbe
parents f8db29bd 1b6301cf
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3930,6 +3930,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 &&