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

Commit 0653f508 authored by Paul Jensen's avatar Paul Jensen Committed by Android (Google) Code Review
Browse files

Merge "Don't allow an uncreated Network to satsify requests." into lmp-mr1-dev

parents e548c3a3 57a767ff
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3973,7 +3973,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
    //                 another higher scoring network by another call to rematchNetworkAndRequests()
    //                 and this other call also lingered newNetwork.
    private void rematchNetworkAndRequests(NetworkAgentInfo newNetwork, boolean nascent) {
        if (!newNetwork.created) loge("ERROR: uncreated network being rematched.");
        if (!newNetwork.created) return;
        if (nascent && !newNetwork.validated) loge("ERROR: nascent network not validated.");
        boolean keep = newNetwork.isVPN();
        boolean isNewDefault = false;
@@ -4272,7 +4272,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
        final int oldScore = nai.getCurrentScore();
        nai.setCurrentScore(score);

        if (nai.created) rematchAllNetworksAndRequests(nai, oldScore);
        rematchAllNetworksAndRequests(nai, oldScore);

        sendUpdatedScoreToFactories(nai);
    }