From 58644b1f702472d4a862ba9f0744d87c962b7d02 Mon Sep 17 00:00:00 2001 From: Chiachang Wang Date: Wed, 21 Jul 2021 10:28:54 +0800 Subject: [PATCH] Remove DISCONNECTING check from handleReportNetworkConnectivity ConnectivityService doesn't use it, and the NetworkAgent API never set it. This case does not happen in pratice, so remove the check. Bug: 192611346 Test: atest FrameworksNetTests Change-Id: I1f114c9b65050527378ee73bc86e4cda8868bca9 --- service/src/com/android/server/ConnectivityService.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/service/src/com/android/server/ConnectivityService.java b/service/src/com/android/server/ConnectivityService.java index 770aa8a7cf..41afd82e48 100644 --- a/service/src/com/android/server/ConnectivityService.java +++ b/service/src/com/android/server/ConnectivityService.java @@ -5083,10 +5083,8 @@ public class ConnectivityService extends IConnectivityManager.Stub private void handleReportNetworkConnectivity( @Nullable NetworkAgentInfo nai, int uid, boolean hasConnectivity) { - // TODO(b/192611346): remove NetworkInfo.State.DISCONNECTING as it's not used if (nai == null || nai != getNetworkAgentInfoForNetwork(nai.network) - || nai.networkInfo.getState() == NetworkInfo.State.DISCONNECTING || nai.networkInfo.getState() == NetworkInfo.State.DISCONNECTED) { return; }