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

Commit 20007cb4 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role)
Browse files

[automerger] Limit IsSeparateProfileChallengeAllowed to system callers am:...

[automerger] Limit IsSeparateProfileChallengeAllowed to system callers am: 9061fcc4 am: 39f54326 am: 9c0bc540 am: 55209aca am: d5ce9a41

Change-Id: I9f9adc6f9979b3ee946e43150556f0ba971a67f8
parents 2833e406 d5ce9a41
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3436,6 +3436,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 &&