am 1d366274: Merge "Fix issue: Disable soft ap when test activity is created. Add timer for soft ap enalbing timer: 6192139" into jb-dev
* commit '1d366274bac3153123bd37132ab87e3652e7feab': Fix issue: Disable soft ap when test activity is created. Add timer for soft ap enalbing timer: 6192139
This commit is contained in:
@@ -244,8 +244,13 @@ public class ConnectivityManagerTestActivity extends Activity {
|
||||
mContext = this;
|
||||
mChannel = mWifiManager.initialize(mContext, mContext.getMainLooper(), null);
|
||||
|
||||
initializeNetworkStates();
|
||||
if (mWifiManager.isWifiApEnabled()) {
|
||||
// if soft AP is enabled, disable it
|
||||
mWifiManager.setWifiApEnabled(null, false);
|
||||
log("Disable soft ap");
|
||||
}
|
||||
|
||||
initializeNetworkStates();
|
||||
log("Clear Wifi before we start the test.");
|
||||
removeConfiguredNetworksAndDisableWifi();
|
||||
mWifiRegexs = mCM.getTetherableWifiRegexs();
|
||||
|
||||
@@ -103,7 +103,7 @@ public class WifiApStress
|
||||
assertTrue(mAct.mWifiManager.setWifiApEnabled(config, true));
|
||||
// Wait for wifi ap state to be ENABLED
|
||||
assertTrue(mAct.waitForWifiAPState(WifiManager.WIFI_AP_STATE_ENABLED,
|
||||
ConnectivityManagerTestActivity.LONG_TIMEOUT));
|
||||
2 * ConnectivityManagerTestActivity.LONG_TIMEOUT));
|
||||
// Wait for wifi tethering result
|
||||
assertEquals(ConnectivityManagerTestActivity.SUCCESS,
|
||||
mAct.waitForTetherStateChange(2*ConnectivityManagerTestActivity.SHORT_TIMEOUT));
|
||||
|
||||
@@ -83,6 +83,7 @@ public class WifiStressTest
|
||||
@Override
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
mAct = getActivity();
|
||||
mRunner = (ConnectivityManagerStressTestRunner) getInstrumentation();
|
||||
mReconnectIterations = mRunner.mReconnectIterations;
|
||||
@@ -97,11 +98,6 @@ public class WifiStressTest
|
||||
mOutputWriter = new BufferedWriter(new FileWriter(new File(
|
||||
Environment.getExternalStorageDirectory(), OUTPUT_FILE), true));
|
||||
mAct.turnScreenOn();
|
||||
if (mAct.mWifiManager.isWifiApEnabled()) {
|
||||
// if soft AP is enabled, disable it
|
||||
assertTrue(mAct.mWifiManager.setWifiApEnabled(null, false));
|
||||
Log.v(TAG, "disable soft ap");
|
||||
}
|
||||
if (!mAct.mWifiManager.isWifiEnabled()) {
|
||||
log("Enable wi-fi before stress tests.");
|
||||
if (!mAct.enableWifi()) {
|
||||
|
||||
Reference in New Issue
Block a user