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

Commit 6d5536a7 authored by Pedro Loureiro's avatar Pedro Loureiro
Browse files

Always add legacy DeviceConfigService to ServiceManager

Now that we are able to handover shell commands from the legacy (i.e.
platform-provided) DeviceConfigService to the mainline-module-provided
service, we always add the legacy service and it can decide to hand over
the command to the mainline service when appropriate.

Bug: 263955152

Test: manual because logic is behind feature flags
Change-Id: I1ef0235e3a262b5cd5cb8b5f6c40fe1fc0202e53
parent c9ea074e
Loading
Loading
Loading
Loading
+1 −8
Original line number Original line Diff line number Diff line
@@ -96,7 +96,6 @@ import android.provider.Settings.Config.SyncDisabledMode;
import android.provider.Settings.Global;
import android.provider.Settings.Global;
import android.provider.Settings.Secure;
import android.provider.Settings.Secure;
import android.provider.Settings.SetAllResult;
import android.provider.Settings.SetAllResult;
import android.provider.UpdatableDeviceConfigServiceReadiness;
import android.provider.settings.validators.SystemSettingsValidators;
import android.provider.settings.validators.SystemSettingsValidators;
import android.provider.settings.validators.Validator;
import android.provider.settings.validators.Validator;
import android.text.TextUtils;
import android.text.TextUtils;
@@ -417,14 +416,8 @@ public class SettingsProvider extends ContentProvider {
            startWatchingUserRestrictionChanges();
            startWatchingUserRestrictionChanges();
        });
        });
        ServiceManager.addService("settings", new SettingsService(this));
        ServiceManager.addService("settings", new SettingsService(this));
        addDeviceConfigServiceIfNeeded();
        return true;
    }

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


    @Override
    @Override