[NS A23.1] Minor cleanup
The argument is always true. Test: ConnectivityServiceTest Change-Id: Ibebdae14e63e6baf74db054038ee575ec462f6d5
This commit is contained in:
@@ -5959,7 +5959,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
// the change we're processing can't affect any requests, it can only affect the listens
|
// the change we're processing can't affect any requests, it can only affect the listens
|
||||||
// on this network. We might have been called by rematchNetworkAndRequests when a
|
// on this network. We might have been called by rematchNetworkAndRequests when a
|
||||||
// network changed foreground state.
|
// network changed foreground state.
|
||||||
processListenRequests(nai, true);
|
processListenRequests(nai);
|
||||||
} else {
|
} else {
|
||||||
// If the requestable capabilities have changed or the score changed, we can't have been
|
// If the requestable capabilities have changed or the score changed, we can't have been
|
||||||
// called by rematchNetworkAndRequests, so it's safe to start a rematch.
|
// called by rematchNetworkAndRequests, so it's safe to start a rematch.
|
||||||
@@ -6267,14 +6267,10 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
updateAllVpnsCapabilities();
|
updateAllVpnsCapabilities();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processListenRequests(@NonNull NetworkAgentInfo nai, boolean capabilitiesChanged) {
|
private void processListenRequests(@NonNull final NetworkAgentInfo nai) {
|
||||||
// For consistency with previous behaviour, send onLost callbacks before onAvailable.
|
// For consistency with previous behaviour, send onLost callbacks before onAvailable.
|
||||||
processNewlyLostListenRequests(nai);
|
processNewlyLostListenRequests(nai);
|
||||||
|
notifyNetworkCallbacks(nai, ConnectivityManager.CALLBACK_CAP_CHANGED);
|
||||||
if (capabilitiesChanged) {
|
|
||||||
notifyNetworkCallbacks(nai, ConnectivityManager.CALLBACK_CAP_CHANGED);
|
|
||||||
}
|
|
||||||
|
|
||||||
processNewlySatisfiedListenRequests(nai);
|
processNewlySatisfiedListenRequests(nai);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user