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

Commit 9b1ad727 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Load policy engine on PHASE_SYSTEM_SERVICES_READY" into main

parents e3e99b28 ac05028c
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1472,11 +1472,10 @@ final class DevicePolicyEngine {
        synchronized (mLock) {
            clear();
            new DevicePoliciesReaderWriter().readFromFileLocked();
            reapplyAllPoliciesLocked();
        }
    }

    private <V> void reapplyAllPoliciesLocked() {
    <V> void reapplyAllPoliciesLocked() {
        for (PolicyKey policy : mGlobalPolicies.keySet()) {
            PolicyState<?> policyState = mGlobalPolicies.get(policy);
            // Policy definition and value will always be of the same type
+5 −0
Original line number Diff line number Diff line
@@ -3347,6 +3347,11 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                mOwners.systemReady();
                applyManagedSubscriptionsPolicyIfRequired();
                break;
            case SystemService.PHASE_SYSTEM_SERVICES_READY:
                synchronized (getLockObject()) {
                    mDevicePolicyEngine.reapplyAllPoliciesLocked();
                }
                break;
            case SystemService.PHASE_ACTIVITY_MANAGER_READY:
                synchronized (getLockObject()) {
                    migrateToProfileOnOrganizationOwnedDeviceIfCompLocked();