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

Commit d5ce9a41 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

Change-Id: I9f56349020376c4cb459597bf01cb4956344f7a8
parents 022bfaa8 55209aca
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3155,6 +3155,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 &&