WifiManagerTest: |disableOthers| flag change

Change the CTS test to reflect the change in behaviour of the
|disableOthers| flag in WifiManager.enableNetwork(). This will now just
be used as an indication to trigger connection to the specified network
instead of disabling all other configured networks.

Bug: 34765254
Test: Compiles
Change-Id: I97a5a84bb861e289d966552cea7f36d7dd4fd090
This commit is contained in:
Roshan Pius
2017-01-27 10:15:23 -08:00
parent a17d71f60a
commit 446ca6fd2a

View File

@@ -218,16 +218,6 @@ public class WifiManagerTest extends AndroidTestCase {
return -1;
}
private void assertDisableOthers(WifiConfiguration wifiConfiguration, boolean disableOthers) {
for (WifiConfiguration w : mWifiManager.getConfiguredNetworks()) {
if ((!w.SSID.equals(wifiConfiguration.SSID)) && w.status != Status.CURRENT) {
if (disableOthers) {
assertEquals(Status.DISABLED, w.status);
}
}
}
}
/**
* test point of wifiManager actions:
* 1.reconnect
@@ -383,7 +373,6 @@ public class WifiManagerTest extends AndroidTestCase {
boolean disableOthers = true;
assertTrue(mWifiManager.enableNetwork(netId, disableOthers));
wifiConfiguration = mWifiManager.getConfiguredNetworks().get(pos);
assertDisableOthers(wifiConfiguration, disableOthers);
assertEquals(Status.ENABLED, wifiConfiguration.status);
assertTrue(mWifiManager.disableNetwork(netId));