Start NetworkStack on system server start
The network stack will host updatable network components that are being
moved from the system server.
Test: flashed, booted
Bug: b/112869080
Change-Id: I63f98405b69615e7077aed374b8f34a84fb1e4b2
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 4decd4f..2d07fd6 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -1204,6 +1204,16 @@
}
traceEnd();
+ traceBeginAndSlog("StartNetworkStack");
+ try {
+ final android.net.NetworkStack networkStack =
+ context.getSystemService(android.net.NetworkStack.class);
+ networkStack.start(context);
+ } catch (Throwable e) {
+ reportWtf("starting Network Stack", e);
+ }
+ traceEnd();
+
traceBeginAndSlog("StartNsdService");
try {
serviceDiscovery = NsdService.create(context);