No quotes for password
Putting quotes for password in soft AP is not useful. It simplifies processing in framework. Bug: 2708960 Change-Id: If44aeb336732aa8089d3e401b546ebf9b3cbd25a
This commit is contained in:
@@ -78,7 +78,7 @@ class WifiApDialog extends AlertDialog implements View.OnClickListener,
|
|||||||
* This is not the case on the client side. We need to
|
* This is not the case on the client side. We need to
|
||||||
* make things consistent and clean it up
|
* make things consistent and clean it up
|
||||||
*/
|
*/
|
||||||
config.SSID = mSsid.getText().toString().replaceAll("\"","");
|
config.SSID = mSsid.getText().toString();
|
||||||
|
|
||||||
switch (mSecurityType) {
|
switch (mSecurityType) {
|
||||||
case AccessPoint.SECURITY_NONE:
|
case AccessPoint.SECURITY_NONE:
|
||||||
@@ -90,11 +90,7 @@ class WifiApDialog extends AlertDialog implements View.OnClickListener,
|
|||||||
config.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN);
|
config.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN);
|
||||||
if (mPassword.length() != 0) {
|
if (mPassword.length() != 0) {
|
||||||
String password = mPassword.getText().toString();
|
String password = mPassword.getText().toString();
|
||||||
if (password.matches("[0-9A-Fa-f]{64}")) {
|
config.preSharedKey = password;
|
||||||
config.preSharedKey = password;
|
|
||||||
} else {
|
|
||||||
config.preSharedKey = '"' + password + '"';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
@@ -128,9 +124,6 @@ class WifiApDialog extends AlertDialog implements View.OnClickListener,
|
|||||||
break;
|
break;
|
||||||
case AccessPoint.SECURITY_PSK:
|
case AccessPoint.SECURITY_PSK:
|
||||||
String str = mWifiConfig.preSharedKey;
|
String str = mWifiConfig.preSharedKey;
|
||||||
if (!str.matches("[0-9A-Fa-f]{64}")) {
|
|
||||||
str = str.substring(1,str.length()-1);
|
|
||||||
}
|
|
||||||
mPassword.setText(str);
|
mPassword.setText(str);
|
||||||
mSecurity.setSelection(WPA_INDEX);
|
mSecurity.setSelection(WPA_INDEX);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user