Fix the double-quoted SSID issue.

Bug id http://b/issue?id=2684571

Change-Id: I0f1e508b9a3d0fefcef28235380392368a51e42a
This commit is contained in:
Chung-yih Wang
2010-05-15 10:57:23 +08:00
parent e434bfb216
commit 8c81257f70
6 changed files with 25 additions and 9 deletions

View File

@@ -92,11 +92,13 @@ class WifiDialog extends AlertDialog implements View.OnClickListener,
WifiConfiguration config = new WifiConfiguration();
if (mAccessPoint == null) {
config.SSID = mSsid.getText().toString();
config.SSID = AccessPoint.convertToQuotedString(
mSsid.getText().toString());
// If the user adds a network manually, assume that it is hidden.
config.hiddenSSID = true;
} else if (mAccessPoint.networkId == -1) {
config.SSID = mAccessPoint.ssid;
config.SSID = AccessPoint.convertToQuotedString(
mAccessPoint.ssid);
} else {
config.networkId = mAccessPoint.networkId;
}