Merge "Always add legacy DeviceConfigService to ServiceManager"

This commit is contained in:
Pedro Loureiro
2023-02-14 11:04:28 +00:00
committed by Android (Google) Code Review

View File

@@ -97,7 +97,6 @@ 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;
@@ -419,16 +418,10 @@ public class SettingsProvider extends ContentProvider {
startWatchingUserRestrictionChanges();
});
ServiceManager.addService("settings", new SettingsService(this));
addDeviceConfigServiceIfNeeded();
ServiceManager.addService("device_config", new DeviceConfigService(this));
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);