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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user