[NS A31] Simplification
The condition this is testing for cannot actually be false.
The only place where the code writes a null value into this
map is at the end of computeRequestReassignmentForNetwork :
reassignedRequests.put(nri, null).
This proves the code the if() block, which proves that
newNetwork.isSatisfyingRequest(nri.request.requestId) is true.
By definition newNetwork.isSatisfyingRequest(nri) implies that
nri.mSatifier == newNetwork, which proves that
previousSatisfier == newNetwork whenever newSatisfier is null.
Fixes: 146482072
Test: FrameworksNetTests
Change-Id: Ifd6faedce7d49757b82a5f341076ab208b0ccfcb
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 9b0be06..36afbfb 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -6586,15 +6586,9 @@
" request " + nri.request.requestId);
}
newNetwork.removeRequest(nri.request.requestId);
- if (previousSatisfier == newNetwork) {
- nri.mSatisfier = null;
- if (isDefaultRequest(nri)) mDefaultNetworkNai = null;
- sendUpdatedScoreToFactories(nri.request, null);
- } else {
- Slog.wtf(TAG, "BUG: Removing request " + nri.request.requestId + " from " +
- newNetwork.name() +
- " without updating mSatisfier or providers!");
- }
+ nri.mSatisfier = null;
+ if (isDefaultRequest(nri)) mDefaultNetworkNai = null;
+ sendUpdatedScoreToFactories(nri.request, null);
}
}
}