Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ac71b7f authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Fix filter on CONNECTIVITY_ACTION updates

Only send for network types which the network supports.

bug:22411968
Change-Id: I97765544eb653caf0ea4fc5d3feec5742d5d88dc
parent 6795a2ae
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);
                }