Don't refcount TRACK_DEFAULT requests.

This has no concrete impact on the behavior of ConnectivityService,
but in principle TRACK_DEFAULT requests should not be counted toward
requests that make a network foreground. It does not have an impact
because only VPNs could be affected by this, and VPNs are always in
the foreground by definition.

Test: runtest frameworks-net
Test: cts
Change-Id: Id2ae6b5c9d542fe168e64ed713b6ec0a04062c82
This commit is contained in:
Chalard Jean
2018-02-16 17:59:29 +09:00
parent 91d3912eab
commit b0bf117861

View File

@@ -285,7 +285,6 @@ public class NetworkAgentInfo implements Comparable<NetworkAgentInfo> {
int delta = add ? +1 : -1;
switch (request.type) {
case REQUEST:
case TRACK_DEFAULT:
mNumRequestNetworkRequests += delta;
break;
@@ -294,6 +293,7 @@ public class NetworkAgentInfo implements Comparable<NetworkAgentInfo> {
mNumBackgroundNetworkRequests += delta;
break;
case TRACK_DEFAULT:
case LISTEN:
break;