Don't reevaluate disconnected networks

This serves no purpose and adds several log messages every time a
network disconnects.  The extra log messages contribute to
NetworkMonitor's chatty-ness and towards it getting muted.

Bug:21480101
Change-Id: I372f9939c534f77b052a15fdb2cd5288d19ddbab
This commit is contained in:
Paul Jensen
2015-06-25 10:28:34 -04:00
parent c28e13c2cd
commit 3c3c6e8c40

View File

@@ -2684,7 +2684,10 @@ public class ConnectivityService extends IConnectivityManager.Stub
} else {
nai = getNetworkAgentInfoForNetwork(network);
}
if (nai == null) return;
if (nai == null || nai.networkInfo.getState() == NetworkInfo.State.DISCONNECTING ||
nai.networkInfo.getState() == NetworkInfo.State.DISCONNECTED) {
return;
}
// Revalidate if the app report does not match our current validated state.
if (hasConnectivity == nai.lastValidated) return;
final int uid = Binder.getCallingUid();