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

Commit b45bb48c authored by Pavel Grafov's avatar Pavel Grafov
Browse files

Allow QUERY_ADMIN_POLICY holders query admins

This is to allow privileged apps like SysUI to query which admin
enforced a restriction.

Bug: 379833424
Test: TH
Flag: EXEMPT bugfix
Change-Id: I83a4d528fce4f7dd196e4623d537cf312dd18899
parent d4815549
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16412,7 +16412,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
    @Override
    public android.app.admin.EnforcingAdmin getEnforcingAdmin(int userId, String identifier) {
        Preconditions.checkCallAuthorization(isSystemUid(getCallerIdentity()));
        Preconditions.checkCallAuthorization(canQueryAdminPolicy(getCallerIdentity()));
        return getEnforcingAdminInternal(userId, identifier);
    }