New IpConnectivityMetrics service
This patch defines a new metrics service for IpConnectivity events
defined in android.net.metrics, separate from currently existing
MetricsLoggerService.
Similarly to MetricsLoggerService, the new service has an event buffer.
It also implements a dumpsys interface that can be used to flush events
and output a serialized proto.
Bug: 31254800
Change-Id: I0c3faeb4008b283f85d9ba9460371fa68956ea3b
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 97a829e..61d5066 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -61,6 +61,7 @@
import com.android.server.audio.AudioService;
import com.android.server.camera.CameraService;
import com.android.server.clipboard.ClipboardService;
+import com.android.server.connectivity.IpConnectivityMetrics;
import com.android.server.connectivity.MetricsLoggerService;
import com.android.server.devicepolicy.DevicePolicyManagerService;
import com.android.server.display.DisplayManagerService;
@@ -653,6 +654,10 @@
mSystemServiceManager.startService(MetricsLoggerService.class);
Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
+ traceBeginAndSlog("IpConnectivityMetrics");
+ mSystemServiceManager.startService(IpConnectivityMetrics.class);
+ Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
+
traceBeginAndSlog("PinnerService");
mSystemServiceManager.startService(PinnerService.class);
Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);