Resolve ambiguous argument.

CTS tests don't have access to TestNetworkAgent and therefore
require overloading this method, which means 'null' is ambiguous.

Bug: 139268426
Test: FrameworksNetTests
Change-Id: I9279718bde30bd98eff901921fb3411d22da72e5
This commit is contained in:
Chalard Jean
2020-03-13 15:01:26 +09:00
parent d88d10a100
commit a7cc6d8eee

View File

@@ -3729,7 +3729,7 @@ public class ConnectivityServiceTest {
mCm.requestNetwork(nr, networkCallback, timeoutMs); mCm.requestNetwork(nr, networkCallback, timeoutMs);
// pass timeout and validate that UNAVAILABLE is called // pass timeout and validate that UNAVAILABLE is called
networkCallback.expectCallback(CallbackEntry.UNAVAILABLE, null); networkCallback.expectCallback(CallbackEntry.UNAVAILABLE, (Network) null);
// create a network satisfying request - validate that request not triggered // create a network satisfying request - validate that request not triggered
mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI); mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI);
@@ -3820,7 +3820,7 @@ public class ConnectivityServiceTest {
// Simulate the factory releasing the request as unfulfillable and expect onUnavailable! // Simulate the factory releasing the request as unfulfillable and expect onUnavailable!
testFactory.triggerUnfulfillable(requests.get(newRequestId)); testFactory.triggerUnfulfillable(requests.get(newRequestId));
networkCallback.expectCallback(CallbackEntry.UNAVAILABLE, null); networkCallback.expectCallback(CallbackEntry.UNAVAILABLE, (Network) null);
testFactory.waitForRequests(); testFactory.waitForRequests();
// unregister network callback - a no-op (since already freed by the // unregister network callback - a no-op (since already freed by the