summaryrefslogtreecommitdiff
path: root/tests/net/java/com/android/server/ConnectivityServiceTest.java
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2021-03-09 21:57:27 +0900
committerLorenzo Colitti <lorenzo@google.com>2021-03-10 23:33:08 +0900
commite93309bff78b8098bb16a9a2c60a070e4f8dfd22 (patch)
tree2b9290dd48dd871e08beeae805a84a9844bd0ce0 /tests/net/java/com/android/server/ConnectivityServiceTest.java
parent643fb23a74a8382bfa73f8b517990dc20d356c87 (diff)
Set extraInfo on cellular TestNetworkAgents.
This makes the test more realistic, since telephony always puts the APN name in the extraInfo field. It also makes it easy to test that various APIs properly return the extra info without plumbing a new parameter through TestNetworkAgentWrapper, NetworkAgentWrapper, and InstrumentedNetworkAgent. Also make the extraInfo and the legacyType available to tests. This will be used in future tests that assert the contents of extraInfo. Bug: 181855958 Test: test-only change Change-Id: If4eddb6cd9e70bb33e10d72aceebaea843244246
Diffstat (limited to 'tests/net/java/com/android/server/ConnectivityServiceTest.java')
-rw-r--r--tests/net/java/com/android/server/ConnectivityServiceTest.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/net/java/com/android/server/ConnectivityServiceTest.java b/tests/net/java/com/android/server/ConnectivityServiceTest.java
index a643bc8a94c0..73f8468ed098 100644
--- a/tests/net/java/com/android/server/ConnectivityServiceTest.java
+++ b/tests/net/java/com/android/server/ConnectivityServiceTest.java
@@ -720,7 +720,7 @@ public class ConnectivityServiceTest {
@Override
protected InstrumentedNetworkAgent makeNetworkAgent(LinkProperties linkProperties,
- final int type, final String typeName) throws Exception {
+ NetworkAgentConfig nac) throws Exception {
mNetworkMonitor = mock(INetworkMonitor.class);
final Answer validateAnswer = inv -> {
@@ -739,8 +739,8 @@ public class ConnectivityServiceTest {
any() /* name */,
nmCbCaptor.capture());
- final InstrumentedNetworkAgent na = new InstrumentedNetworkAgent(this, linkProperties,
- type, typeName) {
+ final InstrumentedNetworkAgent na =
+ new InstrumentedNetworkAgent(this, linkProperties, nac) {
@Override
public void networkStatus(int status, String redirectUrl) {
mRedirectUrl = redirectUrl;