Include suspended network when getAllNetworkStateSnapshots
Suspended network should be considered as temporary shortage of connectivity of a connected network. Thus, it should not be excluded from network state snapshots and causes data usage to stop accounting or iptables rules to be removed on the interface of the suspended network. This change also address the naming confusion of default networks parameter of expectNotifyNetworkStatus. Test: atest ConnectivityServiceTest#testGetAllNetworkStateSnapshots Bug: 196079981 Change-Id: I8096356f9a472fb1c1246fbdf3fd5f981387fb1c
This commit is contained in:
@@ -2311,9 +2311,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
final ArrayList<NetworkStateSnapshot> result = new ArrayList<>();
|
||||
for (Network network : getAllNetworks()) {
|
||||
final NetworkAgentInfo nai = getNetworkAgentInfoForNetwork(network);
|
||||
// TODO: Consider include SUSPENDED networks, which should be considered as
|
||||
// temporary shortage of connectivity of a connected network.
|
||||
if (nai != null && nai.networkInfo.isConnected()) {
|
||||
if (nai != null && nai.everConnected) {
|
||||
// TODO (b/73321673) : NetworkStateSnapshot contains a copy of the
|
||||
// NetworkCapabilities, which may contain UIDs of apps to which the
|
||||
// network applies. Should the UIDs be cleared so as not to leak or
|
||||
|
||||
Reference in New Issue
Block a user