Merge "Handle device config service(s) in platform and mainline"
This commit is contained in:
committed by
Android (Google) Code Review
commit
5fedb58a76
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user