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

Commit 9a2f6c0c authored by Pavel Grafov's avatar Pavel Grafov Committed by android-build-merger
Browse files

Limit IsSeparateProfileChallengeAllowed to system callers am: 1b6301cf am: 406229f0

am: 7b68bad0

Change-Id: Ib85b4abb493aea1f738bba3e83b0850653b614c6
parents b00df479 7b68bad0
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 &&