am 686be938: am c09544bb: Merge "Fix filter on CONNECTIVITY_ACTION updates" into mnc-dev

* commit '686be93854cce44d2dd87148ff8063edc89b6d7b':
  Fix filter on CONNECTIVITY_ACTION updates
This commit is contained in:
Etan Cohen
2015-07-13 23:32:43 +00:00
committed by Android Git Automerger

View File

@@ -565,8 +565,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);
}