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

Commit c6784cc5 authored by Chalard Jean's avatar Chalard Jean
Browse files

[NS A06] Move more side effects out of the decision loop

This is a no-op.

Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I493b969c278097a289a1ef689ca268606227ae79
parent 7f014e5c
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -6352,14 +6352,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
            ensureRunningOnConnectivityServiceThread();
            final NetworkAgentInfo currentNetwork = nri.mSatisfier;
            final boolean satisfies = newNetwork.satisfies(nri.request);
            if (newNetwork == currentNetwork && satisfies) {
                if (VDBG) {
                    log("Network " + newNetwork.name() + " was already satisfying" +
                            " request " + nri.request.requestId + ". No change.");
                }
                keep = true;
                continue;
            }
            if (newNetwork == currentNetwork && satisfies) continue;

            // check if it satisfies the NetworkCapabilities
            if (VDBG) log("  checking if request is satisfied: " + nri.request);
@@ -6414,7 +6407,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
                reassignedRequests.entrySet()) {
            final NetworkRequestInfo nri = entry.getKey();
            final NetworkAgentInfo previousSatisfier = nri.mSatisfier;
            if (entry.getValue() == null) {
            final NetworkAgentInfo newSatisfier = entry.getValue();
            if (newSatisfier == null) {
                // If "newNetwork" is listed as satisfying "nri" but no longer satisfies "nri",
                // mark it as no longer satisfying "nri".  Because networks are processed by
                // rematchAllNetworksAndRequests() in descending score order, "currentNetwork" will