Merge "Fix filter on CONNECTIVITY_ACTION updates" into mnc-dev

This commit is contained in:
Etan Cohen
2015-07-13 18:04:38 +00:00
committed by Android (Google) Code Review

View File

@@ -559,8 +559,9 @@ public class ConnectivityService extends IConnectivityManager.Stub
final DetailedState state = nai.networkInfo.getDetailedState();
for (int type = 0; type < mTypeLists.length; type++) {
final ArrayList<NetworkAgentInfo> list = mTypeLists[type];
final boolean contains = (list != null && list.contains(nai));
final boolean isFirst = (list != null && list.size() > 0 && nai == list.get(0));
if (isFirst || isDefault) {
if (isFirst || (contains && isDefault)) {
maybeLogBroadcast(nai, state, type, isDefault);
sendLegacyNetworkBroadcast(nai, state, type);
}