[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

@@ -63,10 +63,10 @@ class NetworkStateSnapshotTest {
@Test
fun testParcelUnparcel() {
val emptySnapshot = NetworkStateSnapshot(LinkProperties(), NetworkCapabilities(),
Network(TEST_NETID), null, TYPE_NONE)
val emptySnapshot = NetworkStateSnapshot(Network(TEST_NETID), NetworkCapabilities(),
LinkProperties(), null, TYPE_NONE)
val snapshot = NetworkStateSnapshot(
TEST_LINK_PROPERTIES, TEST_CAPABILITIES, Network(TEST_NETID), TEST_IMSI, TYPE_WIFI)
Network(TEST_NETID), TEST_CAPABILITIES, TEST_LINK_PROPERTIES, TEST_IMSI, TYPE_WIFI)
assertParcelSane(emptySnapshot, 5)
assertParcelSane(snapshot, 5)
}