Fix a bug where the AmbientContextManager is not registered if the AmbientContextDetectionService is not available. The manager should always be available, and return STATUS_SERVICE_NOT_AVAILABLE in this case.

Test: end-to-end test
Bug: 192476579
Change-Id: Ifce8c8dbb71a7bb6efd65db41686c14681cf0e4a
This commit is contained in:
Kathy Chen
2022-02-03 19:41:31 +00:00
parent c4837b1306
commit 05c1633355

View File

@@ -3171,11 +3171,6 @@ public final class SystemServer implements Dumpable {
}
private void startAmbientContextService(@NonNull TimingsTraceAndSlog t) {
if (!AmbientContextManagerService.isDetectionServiceConfigured()) {
Slog.d(TAG, "AmbientContextDetectionService is not configured on this device");
return;
}
t.traceBegin("StartAmbientContextService");
mSystemServiceManager.startService(AmbientContextManagerService.class);
t.traceEnd();