From 3ee61008815baeaec759e5d548ba590361613111 Mon Sep 17 00:00:00 2001 From: Chalard Jean Date: Mon, 1 Apr 2019 13:04:07 +0900 Subject: [PATCH] Cleanup SystemReady in the network stack The system server (in SystemServer.java) defines the boot sequence, during which an event called SystemReady happens. This corresponds to a time when critical system services that are depended upon by other components in the system server are ready to handle requests from their dependencies. Some system services are listening to this event to defer initializations that depend on the critical services. Because the network stack is only started after SystemReady, there is no way any NetworkMonitor may be started before SystemReady. Remove the associated mechanism. Fix: 129376083 Test: FrameworksNetTests Change-Id: I071eeb10d0b7c4f71af6653d322c7b442b2cc7ee --- .../android/server/ConnectivityService.java | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 971dd23e98..317eb93d7c 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -3738,16 +3738,6 @@ public class ConnectivityService extends IConnectivityManager.Stub break; } case EVENT_SYSTEM_READY: { - for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) { - // Might have been called already in handleRegisterNetworkAgent since - // mSystemReady is set before sending EVENT_SYSTEM_READY, but calling - // this several times is fine. - try { - nai.networkMonitor().notifySystemReady(); - } catch (RemoteException e) { - e.rethrowFromSystemServer(); - } - } mMultipathPolicyTracker.start(); break; } @@ -5423,15 +5413,6 @@ public class ConnectivityService extends IConnectivityManager.Stub synchronized (mNetworkForNetId) { mNetworkForNetId.put(nai.network.netId, nai); } - synchronized (this) { - if (mSystemReady) { - try { - networkMonitor.notifySystemReady(); - } catch (RemoteException e) { - e.rethrowFromSystemServer(); - } - } - } try { networkMonitor.start();