Merge changes from topic "remove_legacy_NA"

* changes:
  Remove support for legacy network agents
  Remove deprecated constructors for NetworkAgent
  Migrate NetworkAgentWrapper to the new NA API
  Cleanup TestNetworkService
This commit is contained in:
Chalard Jean
2020-12-11 02:32:57 +00:00
committed by Gerrit Code Review
4 changed files with 35 additions and 86 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;