[NS A34] Still more simplification

Test: ConnectivityServiceTest
Change-Id: I85247411eb8fdfb3eae0e7c309ea9537e41cfb80
This commit is contained in:
Chalard Jean
2019-12-03 21:26:27 +09:00
parent 8e382110b8
commit adf1aafb53

View File

@@ -6572,7 +6572,6 @@ public class ConnectivityService extends IConnectivityManager.Stub
if (VDBG || DDBG) log(" accepting network in place of null"); if (VDBG || DDBG) log(" accepting network in place of null");
} }
newSatisfier.unlingerRequest(nri.request); newSatisfier.unlingerRequest(nri.request);
nri.mSatisfier = newSatisfier;
if (!newSatisfier.addRequest(nri.request)) { if (!newSatisfier.addRequest(nri.request)) {
Slog.wtf(TAG, "BUG: " + newSatisfier.name() + " already has " + nri.request); Slog.wtf(TAG, "BUG: " + newSatisfier.name() + " already has " + nri.request);
} }
@@ -6589,8 +6588,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
" request " + nri.request.requestId); " request " + nri.request.requestId);
} }
newNetwork.removeRequest(nri.request.requestId); newNetwork.removeRequest(nri.request.requestId);
nri.mSatisfier = null;
} }
nri.mSatisfier = newSatisfier;
// Tell NetworkProviders about the new score, so they can stop // Tell NetworkProviders about the new score, so they can stop
// trying to connect if they know they cannot match it. // trying to connect if they know they cannot match it.
// TODO - this could get expensive if there are a lot of outstanding requests for this // TODO - this could get expensive if there are a lot of outstanding requests for this