diff options
author | Xia Wang <xiaw@google.com> | 2010-05-20 10:22:59 -0700 |
---|---|---|
committer | Xia Wang <xiaw@google.com> | 2010-05-20 10:22:59 -0700 |
commit | 069067963cf0117cfb4a1aef99b550b126d9ca92 (patch) | |
tree | 8e58c80b14bc2c55e08da3b7ee78feecc93ecf98 /core | |
parent | dc737ca986ed9055b4bb39c67d470b6886522ca6 (diff) | |
download | frameworks_base-069067963cf0117cfb4a1aef99b550b126d9ca92.zip frameworks_base-069067963cf0117cfb4a1aef99b550b126d9ca92.tar.gz frameworks_base-069067963cf0117cfb4a1aef99b550b126d9ca92.tar.bz2 |
If the network SSID is a string, it should be enclosed in double quotation marks.
bug id: 2701058
Change-Id: I40e10ba096053710d4974b005d0d2e7c309ccffe
Diffstat (limited to 'core')
-rw-r--r-- | core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java index 6475655..7392ad4 100644 --- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java +++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestActivity.java @@ -301,7 +301,7 @@ public class ConnectivityManagerTestActivity extends Activity { if (sr.SSID.equals(knownSSID)) { Log.v(LOG_TAG, "found " + knownSSID + " in the scan result list"); WifiConfiguration config = new WifiConfiguration(); - config.SSID = sr.SSID; + config.SSID = convertToQuotedString(sr.SSID); config.allowedKeyManagement.set(KeyMgmt.NONE); int networkId = mWifiManager.addNetwork(config); // Connect to network by disabling others. @@ -387,6 +387,10 @@ public class ConnectivityManagerTestActivity extends Activity { context.sendBroadcast(intent); } + protected static String convertToQuotedString(String string) { + return "\"" + string + "\""; + } + @Override protected void onDestroy() { super.onDestroy(); |