Merge commit '75a43c605449e72074fc55576c8e712ff12906db' into kraken * commit '75a43c605449e72074fc55576c8e712ff12906db': Fix crash for tether with quotes in SSID
This commit is contained in:
@@ -72,7 +72,13 @@ class WifiApDialog extends AlertDialog implements View.OnClickListener,
|
||||
|
||||
WifiConfiguration config = new WifiConfiguration();
|
||||
|
||||
config.SSID = AccessPoint.convertToQuotedString(mSsid.getText().toString());
|
||||
/**
|
||||
* TODO: SSID in WifiConfiguration for soft ap
|
||||
* is being stored as a raw string without quotes.
|
||||
* This is not the case on the client side. We need to
|
||||
* make things consistent and clean it up
|
||||
*/
|
||||
config.SSID = mSsid.getText().toString().replaceAll("\"","");
|
||||
|
||||
switch (mSecurityType) {
|
||||
case AccessPoint.SECURITY_NONE:
|
||||
@@ -115,7 +121,7 @@ class WifiApDialog extends AlertDialog implements View.OnClickListener,
|
||||
context.getString(R.string.wifi_cancel), mListener);
|
||||
|
||||
if (mWifiConfig != null) {
|
||||
mSsid.setText(AccessPoint.removeDoubleQuotes(mWifiConfig.SSID));
|
||||
mSsid.setText(mWifiConfig.SSID);
|
||||
switch (mSecurityType) {
|
||||
case AccessPoint.SECURITY_NONE:
|
||||
mSecurity.setSelection(OPEN_INDEX);
|
||||
|
@@ -153,8 +153,7 @@ public class WifiApEnabler implements Preference.OnPreferenceChangeListener {
|
||||
com.android.internal.R.string.wifi_tether_configure_ssid_default);
|
||||
mCheckBox.setSummary(String.format(
|
||||
mContext.getString(R.string.wifi_tether_enabled_subtext),
|
||||
(wifiConfig == null) ? s : AccessPoint.removeDoubleQuotes(
|
||||
wifiConfig.SSID)));
|
||||
(wifiConfig == null) ? s : wifiConfig.SSID));
|
||||
}
|
||||
|
||||
private void updateTetherState(Object[] available, Object[] tethered, Object[] errored) {
|
||||
|
@@ -81,7 +81,7 @@ public class WifiApSettings extends PreferenceActivity
|
||||
s, mSecurityType[OPEN_INDEX]));
|
||||
} else {
|
||||
mCreateNetwork.setSummary(String.format(getString(CONFIG_SUBTEXT),
|
||||
AccessPoint.removeDoubleQuotes(mWifiConfig.SSID),
|
||||
mWifiConfig.SSID,
|
||||
mWifiConfig.allowedKeyManagement.get(KeyMgmt.WPA_PSK) ?
|
||||
mSecurityType[WPA_INDEX] : mSecurityType[OPEN_INDEX]));
|
||||
}
|
||||
@@ -123,7 +123,7 @@ public class WifiApSettings extends PreferenceActivity
|
||||
if(mWifiConfig != null) {
|
||||
mWifiManager.setWifiApEnabled(mWifiConfig, true);
|
||||
mCreateNetwork.setSummary(String.format(getString(CONFIG_SUBTEXT),
|
||||
AccessPoint.removeDoubleQuotes(mWifiConfig.SSID),
|
||||
mWifiConfig.SSID,
|
||||
mWifiConfig.allowedKeyManagement.get(KeyMgmt.WPA_PSK) ?
|
||||
mSecurityType[WPA_INDEX] : mSecurityType[OPEN_INDEX]));
|
||||
/**
|
||||
|
Reference in New Issue
Block a user