Merge "Unify behavior of various cases of "no underlying networks"" into pi-dev

am: 468fdc3dd2

Change-Id: I22f80a6a39d4a19ff74aa61fcbd66f1a041b1003
This commit is contained in:
Chalard Jean
2018-05-22 05:19:52 -07:00
committed by android-build-merger

View File

@@ -4413,13 +4413,11 @@ public class ConnectivityServiceTest {
&& caps.hasCapability(NET_CAPABILITY_NOT_METERED),
vpnNetworkAgent);
// Disconnect wifi too. No underlying networks should mean this is now metered,
// unfortunately a discrepancy in the current implementation has this unmetered.
// TODO : fix this.
// Disconnect wifi too. No underlying networks means this is now metered.
mWiFiNetworkAgent.disconnect();
vpnNetworkCallback.expectCapabilitiesLike((caps) -> caps.hasTransport(TRANSPORT_VPN)
&& !caps.hasTransport(TRANSPORT_CELLULAR) && !caps.hasTransport(TRANSPORT_WIFI)
&& caps.hasCapability(NET_CAPABILITY_NOT_METERED),
&& !caps.hasCapability(NET_CAPABILITY_NOT_METERED),
vpnNetworkAgent);
mMockVpn.disconnect();