summaryrefslogtreecommitdiff
path: root/tests/unit/java/android/net/NetworkStatsTest.java
diff options
context:
space:
mode:
authorCody Kesting <ckesting@google.com>2020-08-03 18:01:40 -0700
committerCody Kesting <ckesting@google.com>2021-07-01 17:38:16 -0700
commitf1120be78bc68fb1748ef95b86e0d486a9897b73 (patch)
tree3e7421b27b4aadf4ae74a8c968ac7340915e12bf /tests/unit/java/android/net/NetworkStatsTest.java
parent4bb141787bfd8e3be9d0df80cccd25e6098db1c5 (diff)
Report result SKIPPED in ConnDiags if the network is not validated.
This CL updates ConnectivityDiagnostics to report NETWORK_VALIDATION_RESULT_SKIPPED when the platform does not validate the reported Network. This CL also updates the behavior for ConnectivityManager#reportNetworkConnectivity, such that it will always generate a ConnectivityReport on the reported network. If the reported connectivity does not match the known connectivity of this network, the network is revalidated and a report is generated. Otherwise, revalidation is not performed and the cached ConnectivityReport is sent instead. This CL also updates ConnDiags behavior for calls to ConnectivityManager#reportNetworkConnectivity. Specifically, ConnDiags callbacks are only notified for these calls if: a) the call causes the Network to be re-validated, or b) the callback registrant was the caller of #reportNetworkConnectivity(). For b), the caller is always guaranteed to receive a ConnectivityReport (a fresh report if the Network is re-validated, else the cached report). Bug: 162407730 Test: atest FrameworksNetTests ConnectivityDiagnosticsManagerTest Change-Id: I78b78919d5b0f09348dfdd5fdb37418b8c7f861f
Diffstat (limited to 'tests/unit/java/android/net/NetworkStatsTest.java')
0 files changed, 0 insertions, 0 deletions