diff options
author | Xia Wang <xiaw@google.com> | 2012-05-06 16:03:34 -0700 |
---|---|---|
committer | Xia Wang <xiaw@google.com> | 2012-05-06 16:03:34 -0700 |
commit | 81341fee6de80d8808afd8af3009258660a8f834 (patch) | |
tree | 071d9664901c590f45e52c98a15124de75333bf0 /core/tests/ConnectivityManagerTest | |
parent | 6aa3138587198c6ddf529c0daee84eea6ea05549 (diff) | |
download | frameworks_base-81341fee6de80d8808afd8af3009258660a8f834.zip frameworks_base-81341fee6de80d8808afd8af3009258660a8f834.tar.gz frameworks_base-81341fee6de80d8808afd8af3009258660a8f834.tar.bz2 |
Fix Wifi test
bug: http://b/issue?id=6446248
Change-Id: I22783ed3de37bf51aed7cee9617017868f524f0d
Diffstat (limited to 'core/tests/ConnectivityManagerTest')
-rw-r--r-- | core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java index 19aa77b..f7b0cd0 100644 --- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java +++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java @@ -246,9 +246,7 @@ public class ConnectivityManagerTestActivity extends Activity { initializeNetworkStates(); - mWifiManager.setWifiEnabled(true); log("Clear Wifi before we start the test."); - sleep(SHORT_TIMEOUT); removeConfiguredNetworksAndDisableWifi(); mWifiRegexs = mCM.getTetherableWifiRegexs(); } @@ -645,6 +643,11 @@ public class ConnectivityManagerTestActivity extends Activity { */ public boolean disconnectAP() { // remove saved networks + if (!mWifiManager.isWifiEnabled()) { + log("Enabled wifi before remove configured networks"); + mWifiManager.setWifiEnabled(true); + sleep(SHORT_TIMEOUT); + } List<WifiConfiguration> wifiConfigList = mWifiManager.getConfiguredNetworks(); log("size of wifiConfigList: " + wifiConfigList.size()); for (WifiConfiguration wifiConfig: wifiConfigList) { |