summaryrefslogtreecommitdiff
path: root/services/tests
diff options
context:
space:
mode:
authorjunyulai <junyulai@google.com>2021-01-22 22:46:01 +0800
committerjunyulai <junyulai@google.com>2021-03-02 20:08:53 +0800
commit6b704360478c78e65d7f0a700b5b5333352a16aa (patch)
tree88c35c92cada0785d121585f83db8c4d00ebac77 /services/tests
parent4eb9b18e020749f05763a02fa2c47f4b975b9c88 (diff)
[FUI17] Migrate NetworkStatsService to use NetworkStateSnapshot
This change migrates NetworkStatsService and related code to use NetworkStateSnapshot which is used for replacing the NetworkState. This patch also changes some formating which is suggested by the linter. Test: FrameworksNetTests NetworkPolicyManagerServiceTest Bug: 174123988 Change-Id: I547da8f411cb45bdadc376ac3cadf3f3c55bb282
Diffstat (limited to 'services/tests')
-rw-r--r--services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
index 7d7af03ecd3d..752da31638dd 100644
--- a/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
@@ -2043,7 +2043,8 @@ public class NetworkPolicyManagerServiceTest {
final NetworkCapabilities networkCapabilities = new NetworkCapabilities();
networkCapabilities.addTransportType(TRANSPORT_WIFI);
networkCapabilities.setSSID(TEST_SSID);
- return new NetworkState(TYPE_WIFI, prop, networkCapabilities, null, null);
+ return new NetworkState(TYPE_WIFI, prop, networkCapabilities, new Network(TEST_NET_ID),
+ null);
}
private void expectHasInternetPermission(int uid, boolean hasIt) throws Exception {