Style improvements to removeDefaultNetworkRequests.
Rename the variable and add a comment to make the code clearer. Bug: 410731080 Flag: EXEMPT refactor Test: covered by existing tests Change-Id: Ia5ff9754b070951948cb3edcfbe11934a2dc13ff
This commit is contained in:
parent
a211521618
commit
49ca1e7a32
1 changed files with 5 additions and 5 deletions
|
|
@ -14603,12 +14603,12 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||
}
|
||||
}
|
||||
|
||||
/** Removes all default network requests matching the specified filter. */
|
||||
private void removeDefaultNetworkRequests(Predicate<NetworkRequestInfo> filter) {
|
||||
// Skip the requests which are set by other network preference. Because the uid range rules
|
||||
// should stay in netd.
|
||||
final Set<NetworkRequestInfo> requests = new ArraySet<>(mDefaultNetworkRequests);
|
||||
requests.removeIf(filter.negate());
|
||||
handleRemoveNetworkRequests(requests);
|
||||
// Remove all requests in mDefaultNetworkRequests except the ones that match the filter.
|
||||
final Set<NetworkRequestInfo> toRemove = new ArraySet<>(mDefaultNetworkRequests);
|
||||
toRemove.removeIf(filter.negate());
|
||||
handleRemoveNetworkRequests(toRemove);
|
||||
}
|
||||
|
||||
private void removeDefaultNetworkRequestsForPreference(final int preferenceOrder) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue