Merge "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."

This commit is contained in:
Kathy Chen
2022-02-04 16:41:13 +00:00
committed by Android (Google) Code Review

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();