Merge "[NS A42] Move writing to the reassignment to the computation" am: 9b8a767cd6
Change-Id: Ic04c72d0720bb53a38329dbcbc75cd914e1296c0
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index d1383e2..097f646 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -6620,9 +6620,13 @@
}
if (currentNetwork == null || currentNetwork.getCurrentScore() < score) {
reassignedRequests.put(nri, newNetwork);
+ changes.addRequestReassignment(new NetworkReassignment.RequestReassignment(
+ nri, currentNetwork, newNetwork));
}
} else if (newNetwork == currentNetwork) {
reassignedRequests.put(nri, null);
+ changes.addRequestReassignment(new NetworkReassignment.RequestReassignment(
+ nri, currentNetwork, null));
}
}
return reassignedRequests;
@@ -6663,8 +6667,6 @@
final NetworkRequestInfo nri = entry.getKey();
final NetworkAgentInfo previousSatisfier = nri.mSatisfier;
final NetworkAgentInfo newSatisfier = entry.getValue();
- changes.addRequestReassignment(new NetworkReassignment.RequestReassignment(
- nri, previousSatisfier, newSatisfier));
updateSatisfiersForRematchRequest(nri, previousSatisfier, newSatisfier, now);
}
}