Remove the ability to turn off TimeDetectorService

Remove the ability to turn off TimeDetectorService. After
http://r.android.com/1000492 it will be required in all cases.

Also remove [Old|New]NetworkTimeUpdateService as the expected
changes have not been implemented.

Bug: 133492648
Test: build only
Change-Id: Iad7ff59b19fa54750831819c68b7b733e5763902
This commit is contained in:
Neil Fuller
2019-06-27 15:01:01 +01:00
parent 219098960d
commit bef7e809ed
3 changed files with 9 additions and 346 deletions

View File

@@ -1449,16 +1449,13 @@ public final class SystemServer {
}
t.traceEnd();
final boolean useNewTimeServices = true;
if (useNewTimeServices) {
t.traceBegin("StartTimeDetectorService");
try {
mSystemServiceManager.startService(TIME_DETECTOR_SERVICE_CLASS);
} catch (Throwable e) {
reportWtf("starting StartTimeDetectorService service", e);
}
t.traceEnd();
t.traceBegin("StartTimeDetectorService");
try {
mSystemServiceManager.startService(TIME_DETECTOR_SERVICE_CLASS);
} catch (Throwable e) {
reportWtf("starting StartTimeDetectorService service", e);
}
t.traceEnd();
if (!isWatch) {
t.traceBegin("StartSearchManagerService");
@@ -1656,12 +1653,7 @@ public final class SystemServer {
if (!isWatch && !disableNetworkTime) {
t.traceBegin("StartNetworkTimeUpdateService");
try {
if (useNewTimeServices) {
networkTimeUpdater = new NewNetworkTimeUpdateService(context);
} else {
networkTimeUpdater = new OldNetworkTimeUpdateService(context);
}
Slog.d(TAG, "Using networkTimeUpdater class=" + networkTimeUpdater.getClass());
networkTimeUpdater = new NetworkTimeUpdateServiceImpl(context);
ServiceManager.addService("network_time_update_service", networkTimeUpdater);
} catch (Throwable e) {
reportWtf("starting NetworkTimeUpdate service", e);