Merge changes Ic1a5d032,I271e7f4d,I7af37281 am: f1211e9531 am: 089b1c3273 am: 813be534d6

Change-Id: Ic56ae1463dc4229e01f60d2c9afcbb7f6337a97d
This commit is contained in:
Automerger Merge Worker
2020-02-05 01:14:50 +00:00
2 changed files with 39 additions and 27 deletions

View File

@@ -5753,20 +5753,18 @@ public class ConnectivityServiceTest {
mCellNetworkAgent.connect(true);
trustedCallback.expectAvailableThenValidatedCallbacks(mCellNetworkAgent);
verify(mNetworkManagementService).setDefaultNetId(eq(mCellNetworkAgent.getNetwork().netId));
reset(mNetworkManagementService);
mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI);
mWiFiNetworkAgent.connect(true);
trustedCallback.expectAvailableDoubleValidatedCallbacks(mWiFiNetworkAgent);
verify(mNetworkManagementService).setDefaultNetId(eq(mWiFiNetworkAgent.getNetwork().netId));
reset(mNetworkManagementService);
mWiFiNetworkAgent.removeCapability(NET_CAPABILITY_TRUSTED);
// There is currently a bug where losing the TRUSTED capability will send a LOST
// callback to requests before the available callback, in spite of the semantics
// of the requests dictating this should not happen. This is considered benign, but
// ideally should be fixed in the future.
trustedCallback.expectCallback(CallbackEntry.LOST, mWiFiNetworkAgent);
trustedCallback.expectAvailableCallbacksValidated(mCellNetworkAgent);
verify(mNetworkManagementService).setDefaultNetId(eq(mCellNetworkAgent.getNetwork().netId));
reset(mNetworkManagementService);
mCellNetworkAgent.removeCapability(NET_CAPABILITY_TRUSTED);
trustedCallback.expectCallback(CallbackEntry.LOST, mCellNetworkAgent);