Move NetworkStack start to AM.systemReady

In practice the NetworkStack was not started after
ActivityManager#systemReady, since ActivityManager was only scheduling
the start (mPendingStarts).
Requesting the start too early causes issues for the PackageManager to
install updates/rollbacks.

Test: flashed AOSP and internal builds, WiFi working
Bug: 128331883
Change-Id: I93315ad31925bd436e21d1eabb21d5967e6aae60
This commit is contained in:
Remi NGUYEN VAN
2019-03-12 11:50:22 +09:00
parent 7c447498c3
commit c7054c5e20

View File

@@ -1241,14 +1241,6 @@ public final class SystemServer {
}
traceEnd();
traceBeginAndSlog("StartNetworkStack");
try {
NetworkStackClient.getInstance().start(context);
} catch (Throwable e) {
reportWtf("starting Network Stack", e);
}
traceEnd();
traceBeginAndSlog("StartNsdService");
try {
serviceDiscovery = NsdService.create(context);
@@ -1944,6 +1936,14 @@ public final class SystemServer {
SystemService.PHASE_THIRD_PARTY_APPS_CAN_START);
traceEnd();
traceBeginAndSlog("StartNetworkStack");
try {
NetworkStackClient.getInstance().start(context);
} catch (Throwable e) {
reportWtf("starting Network Stack", e);
}
traceEnd();
traceBeginAndSlog("MakeLocationServiceReady");
try {
if (locationF != null) locationF.systemRunning();