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

Commit 5fedb58a authored by Pedro Loureiro's avatar Pedro Loureiro Committed by Android (Google) Code Review
Browse files

Merge "Handle device config service(s) in platform and mainline"

parents 3a409a02 75960f77
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ import android.provider.Settings.Config.SyncDisabledMode;
import android.provider.Settings.Global;
import android.provider.Settings.Secure;
import android.provider.Settings.SetAllResult;
import android.provider.UpdatableDeviceConfigServiceReadiness;
import android.provider.settings.validators.SystemSettingsValidators;
import android.provider.settings.validators.Validator;
import android.text.TextUtils;
@@ -416,10 +417,16 @@ public class SettingsProvider extends ContentProvider {
            startWatchingUserRestrictionChanges();
        });
        ServiceManager.addService("settings", new SettingsService(this));
        ServiceManager.addService("device_config", new DeviceConfigService(this));
        addDeviceConfigServiceIfNeeded();
        return true;
    }

    private void addDeviceConfigServiceIfNeeded() {
        if (!UpdatableDeviceConfigServiceReadiness.shouldStartUpdatableService()) {
            ServiceManager.addService("device_config", new DeviceConfigService(this));
        }
    }

    @Override
    public Bundle call(String method, String name, Bundle args) {
        final int requestingUserId = getRequestingUserId(args);
+4 −0
Original line number Diff line number Diff line
@@ -425,6 +425,8 @@ public final class SystemServer implements Dumpable {
            "com.android.server.sdksandbox.SdkSandboxManagerService$Lifecycle";
    private static final String AD_SERVICES_MANAGER_SERVICE_CLASS =
            "com.android.server.adservices.AdServicesManagerService$Lifecycle";
    private static final String UPDATABLE_DEVICE_CONFIG_SERVICE_CLASS =
            "com.android.server.deviceconfig.DeviceConfigInit$Lifecycle";

    private static final String TETHERING_CONNECTOR_CLASS = "android.net.ITetheringConnector";

@@ -1512,6 +1514,8 @@ public final class SystemServer implements Dumpable {

            t.traceBegin("InstallSystemProviders");
            mActivityManagerService.getContentProviderHelper().installSystemProviders();
            // Device configuration used to be part of System providers
            mSystemServiceManager.startService(UPDATABLE_DEVICE_CONFIG_SERVICE_CLASS);
            // Now that SettingsProvider is ready, reactivate SQLiteCompatibilityWalFlags
            SQLiteCompatibilityWalFlags.reset();
            t.traceEnd();