[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
This commit is contained in:
@@ -6586,15 +6586,9 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
" 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user