[FUI09] Expose NetworkStateSnapshot as system API

This is needed by NetworkStatsService and
NetworkPolicyManagerService to utilize the snapshots of
information of networks that grabbed from ConnectivityService.

Test: atest FrameworksNetTests NetworkPolicyManagerServiceTest
Bug: 174123988
Change-Id: I7e974ef7b23ba9ba6ee775eed9899b0c0e2eca55
This commit is contained in:
junyulai
2020-12-30 19:03:32 +08:00
parent 527859f7a4
commit c6e8355dbd
4 changed files with 9 additions and 9 deletions

View File

@@ -79,7 +79,7 @@ class NetworkTemplateTest {
setCapability(NetworkCapabilities.NET_CAPABILITY_OEM_PRIVATE,
(oemManaged and OEM_PRIVATE) == OEM_PRIVATE)
}
return NetworkStateSnapshot(lp, caps, mock(Network::class.java), subscriberId, type)
return NetworkStateSnapshot(mock(Network::class.java), caps, lp, subscriberId, type)
}
private fun NetworkTemplate.assertMatches(ident: NetworkIdentity) =