From 164529620828506486a1f1055696698242299547 Mon Sep 17 00:00:00 2001 From: Vinit Deshpande Date: Thu, 23 Oct 2014 17:02:19 -0700 Subject: [PATCH] Remove enableNetwork(netId, disableOthers) check from CTS We don't really disable any networks anymore; so there's not much to be verified. Bug: 17937171 Change-Id: I57e16953bdc0a698f3bc5fba555b39bc450c13ab --- .../net/src/android/net/wifi/cts/WifiManagerTest.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java b/tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java index d8df064311..152789cafb 100644 --- a/tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java +++ b/tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java @@ -213,8 +213,9 @@ public class WifiManagerTest extends AndroidTestCase { private void assertDisableOthers(WifiConfiguration wifiConfiguration, boolean disableOthers) { for (WifiConfiguration w : mWifiManager.getConfiguredNetworks()) { if ((!w.SSID.equals(wifiConfiguration.SSID)) && w.status != Status.CURRENT) { - if (disableOthers) + if (disableOthers) { assertEquals(Status.DISABLED, w.status); + } } } } @@ -321,6 +322,7 @@ public class WifiManagerTest extends AndroidTestCase { // skip the test if WiFi is not supported return; } + // store the list of enabled networks, so they can be re-enabled after test completes Set enabledSsids = getEnabledNetworks(mWifiManager.getConfiguredNetworks()); try { @@ -353,11 +355,6 @@ public class WifiManagerTest extends AndroidTestCase { wifiConfiguration = mWifiManager.getConfiguredNetworks().get(pos); assertDisableOthers(wifiConfiguration, disableOthers); assertEquals(Status.ENABLED, wifiConfiguration.status); - disableOthers = true; - - assertTrue(mWifiManager.enableNetwork(netId, disableOthers)); - wifiConfiguration = mWifiManager.getConfiguredNetworks().get(pos); - assertDisableOthers(wifiConfiguration, disableOthers); assertTrue(mWifiManager.disableNetwork(netId)); wifiConfiguration = mWifiManager.getConfiguredNetworks().get(pos);