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

automerge: 934b73f

* commit '934b73fb50afd4280a1b6a509376ca86424fa7b2':
  Don't allow an uncreated Network to satsify requests.
This commit is contained in:
Paul Jensen
2014-11-21 12:50:35 +00:00
committed by android-build-merger

View File

@@ -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);
}