Migrate NetworkAgentWrapper to the new NA API

Test: FrameworksNetTests NetworkStackTests
Bug: 167544279
Change-Id: I5d53a938572682dea827ea681596226b1e271aa6
This commit is contained in:
Chalard Jean
2020-10-09 18:05:06 +09:00
parent 28668319fa
commit 0d3680c12c
2 changed files with 28 additions and 20 deletions

View File

@@ -646,8 +646,8 @@ public class ConnectivityServiceTest {
}
@Override
protected InstrumentedNetworkAgent makeNetworkAgent(LinkProperties linkProperties)
throws Exception {
protected InstrumentedNetworkAgent makeNetworkAgent(LinkProperties linkProperties,
final int type, final String typeName) throws Exception {
mNetworkMonitor = mock(INetworkMonitor.class);
final Answer validateAnswer = inv -> {
@@ -666,7 +666,8 @@ public class ConnectivityServiceTest {
any() /* name */,
nmCbCaptor.capture());
final InstrumentedNetworkAgent na = new InstrumentedNetworkAgent(this, linkProperties) {
final InstrumentedNetworkAgent na = new InstrumentedNetworkAgent(this, linkProperties,
type, typeName) {
@Override
public void networkStatus(int status, String redirectUrl) {
mRedirectUrl = redirectUrl;