summaryrefslogtreecommitdiffstats
path: root/core/tests/ConnectivityManagerTest
diff options
context:
space:
mode:
Diffstat (limited to 'core/tests/ConnectivityManagerTest')
-rw-r--r--core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java6
-rw-r--r--core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiConnectionTest.java20
2 files changed, 2 insertions, 24 deletions
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java
index f01562c..6630601 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java
@@ -94,7 +94,6 @@ public class ConnectivityManagerTestActivity extends Activity {
* Control Wifi States
*/
public WifiManager mWifiManager;
- public WifiManager.Channel mChannel;
/*
* Verify connectivity state
@@ -242,7 +241,6 @@ public class ConnectivityManagerTestActivity extends Activity {
// Get an instance of WifiManager
mWifiManager =(WifiManager)getSystemService(Context.WIFI_SERVICE);
mContext = this;
- mChannel = mWifiManager.initialize(mContext, mContext.getMainLooper(), null);
if (mWifiManager.isWifiApEnabled()) {
// if soft AP is enabled, disable it
@@ -599,7 +597,7 @@ public class ConnectivityManagerTestActivity extends Activity {
log("found " + ssid + " in the scan result list");
log("retry: " + retry);
foundApInScanResults = true;
- mWifiManager.connect(mChannel, config,
+ mWifiManager.connect(config,
new WifiManager.ActionListener() {
public void onSuccess() {
}
@@ -658,7 +656,7 @@ public class ConnectivityManagerTestActivity extends Activity {
for (WifiConfiguration wifiConfig: wifiConfigList) {
log("remove wifi configuration: " + wifiConfig.networkId);
int netId = wifiConfig.networkId;
- mWifiManager.forget(mChannel, netId, new WifiManager.ActionListener() {
+ mWifiManager.forget(netId, new WifiManager.ActionListener() {
public void onSuccess() {
}
public void onFailure(int reason) {
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiConnectionTest.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiConnectionTest.java
index 8d73bc0..81075ef 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiConnectionTest.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiConnectionTest.java
@@ -63,7 +63,6 @@ public class WifiConnectionTest
private ConnectivityManagerTestActivity mAct;
private ConnectivityManagerTestRunner mRunner;
private WifiManager mWifiManager = null;
- private WifiManager.Channel mChannel;
private Set<WifiConfiguration> enabledNetworks = null;
public WifiConnectionTest() {
@@ -77,7 +76,6 @@ public class WifiConnectionTest
mWifiManager = (WifiManager) mRunner.getContext().getSystemService(Context.WIFI_SERVICE);
mAct = getActivity();
- mChannel = mWifiManager.initialize(mAct, mAct.getMainLooper(), null);
networks = mAct.loadNetworkConfigurations();
if (DEBUG) {
@@ -93,24 +91,6 @@ public class WifiConnectionTest
assertTrue("wpa_supplicant is not started ", mAct.mWifiManager.pingSupplicant());
}
- private class WifiServiceHandler extends Handler {
- @Override
- public void handleMessage(Message msg) {
- switch (msg.what) {
- case AsyncChannel.CMD_CHANNEL_HALF_CONNECTED:
- if (msg.arg1 == AsyncChannel.STATUS_SUCCESSFUL) {
- //AsyncChannel in msg.obj
- } else {
- log("Failed to establish AsyncChannel connection");
- }
- break;
- default:
- //Ignore
- break;
- }
- }
- }
-
private void printNetworkConfigurations() {
log("==== print network configurations parsed from XML file ====");
log("number of access points: " + networks.size());