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

Commit d03ee56a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "ESID access for Delegated Cert Installer"

parents 76f6a644 a1485a69
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12875,7 +12875,7 @@ public class DevicePolicyManager {
        }
        try {
            return mService.getEnrollmentSpecificId();
            return mService.getEnrollmentSpecificId(mContext.getPackageName());
        } catch (RemoteException re) {
            throw re.rethrowFromSystemServer();
        }
+1 −1
Original line number Diff line number Diff line
@@ -491,6 +491,6 @@ interface IDevicePolicyManager {

    void setNextOperationSafety(int operation, boolean safe);

    String getEnrollmentSpecificId();
    String getEnrollmentSpecificId(String callerPackage);
    void setOrganizationIdForUser(in String callerPackage, in String enterpriseId, int userId);
}
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ abstract class BaseIDevicePolicyManager extends IDevicePolicyManager.Stub {
        return false;
    }

    public String getEnrollmentSpecificId() {
    public String getEnrollmentSpecificId(String callerPackage) {
        return "";
    }

+4 −3
Original line number Diff line number Diff line
@@ -15699,14 +15699,15 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
    }
    @Override
    public String getEnrollmentSpecificId() {
    public String getEnrollmentSpecificId(String callerPackage) {
        if (!mHasFeature) {
            return "";
        }
        final CallerIdentity caller = getCallerIdentity();
        final CallerIdentity caller = getCallerIdentity(callerPackage);
        Preconditions.checkCallAuthorization(
                isDeviceOwner(caller) || isProfileOwner(caller));
                isDeviceOwner(caller) || isProfileOwner(caller)
                        || isCallerDelegate(caller, DELEGATION_CERT_INSTALL));
        synchronized (getLockObject()) {
            final ActiveAdmin requiredAdmin = getDeviceOrProfileOwnerAdminLocked(