• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

packages/apps/Settings


Commit MetaInfo

Révision18dc7ea709bce68b44ed4fd6f8f65308c3b9101b (tree)
l'heure2010-05-18 05:20:39
AuteurIrfan Sheriff <isheriff@goog...>
CommiterIrfan Sheriff

Message de Log

Fix crash for tether with quotes in SSID

Multiple quotes cause havoc with netd interaction right now.
The solution is to revert the changes for WifiConfiguration on
Access Point side done in Change I0f1e508b and remove all quotes
in the SSID.

Essentially a low risk one line change on top of the revert.

We dont expose API for WifiConfiguration on AP side. This solution
essentially means we treat SSID in WifiConfiguration on AP side
differently. When we do expose things, we should make things consistent.

Change-Id: I0a7e5074b83ace743fc843ee61c1ff86cde8267f

Change Summary

Modification

--- a/src/com/android/settings/wifi/WifiApDialog.java
+++ b/src/com/android/settings/wifi/WifiApDialog.java
@@ -72,7 +72,13 @@ class WifiApDialog extends AlertDialog implements View.OnClickListener,
7272
7373 WifiConfiguration config = new WifiConfiguration();
7474
75- config.SSID = AccessPoint.convertToQuotedString(mSsid.getText().toString());
75+ /**
76+ * TODO: SSID in WifiConfiguration for soft ap
77+ * is being stored as a raw string without quotes.
78+ * This is not the case on the client side. We need to
79+ * make things consistent and clean it up
80+ */
81+ config.SSID = mSsid.getText().toString().replaceAll("\"","");
7682
7783 switch (mSecurityType) {
7884 case AccessPoint.SECURITY_NONE:
@@ -115,7 +121,7 @@ class WifiApDialog extends AlertDialog implements View.OnClickListener,
115121 context.getString(R.string.wifi_cancel), mListener);
116122
117123 if (mWifiConfig != null) {
118- mSsid.setText(AccessPoint.removeDoubleQuotes(mWifiConfig.SSID));
124+ mSsid.setText(mWifiConfig.SSID);
119125 switch (mSecurityType) {
120126 case AccessPoint.SECURITY_NONE:
121127 mSecurity.setSelection(OPEN_INDEX);
--- a/src/com/android/settings/wifi/WifiApEnabler.java
+++ b/src/com/android/settings/wifi/WifiApEnabler.java
@@ -153,8 +153,7 @@ public class WifiApEnabler implements Preference.OnPreferenceChangeListener {
153153 com.android.internal.R.string.wifi_tether_configure_ssid_default);
154154 mCheckBox.setSummary(String.format(
155155 mContext.getString(R.string.wifi_tether_enabled_subtext),
156- (wifiConfig == null) ? s : AccessPoint.removeDoubleQuotes(
157- wifiConfig.SSID)));
156+ (wifiConfig == null) ? s : wifiConfig.SSID));
158157 }
159158
160159 private void updateTetherState(Object[] available, Object[] tethered, Object[] errored) {
--- a/src/com/android/settings/wifi/WifiApSettings.java
+++ b/src/com/android/settings/wifi/WifiApSettings.java
@@ -81,7 +81,7 @@ public class WifiApSettings extends PreferenceActivity
8181 s, mSecurityType[OPEN_INDEX]));
8282 } else {
8383 mCreateNetwork.setSummary(String.format(getString(CONFIG_SUBTEXT),
84- AccessPoint.removeDoubleQuotes(mWifiConfig.SSID),
84+ mWifiConfig.SSID,
8585 mWifiConfig.allowedKeyManagement.get(KeyMgmt.WPA_PSK) ?
8686 mSecurityType[WPA_INDEX] : mSecurityType[OPEN_INDEX]));
8787 }
@@ -123,7 +123,7 @@ public class WifiApSettings extends PreferenceActivity
123123 if(mWifiConfig != null) {
124124 mWifiManager.setWifiApEnabled(mWifiConfig, true);
125125 mCreateNetwork.setSummary(String.format(getString(CONFIG_SUBTEXT),
126- AccessPoint.removeDoubleQuotes(mWifiConfig.SSID),
126+ mWifiConfig.SSID,
127127 mWifiConfig.allowedKeyManagement.get(KeyMgmt.WPA_PSK) ?
128128 mSecurityType[WPA_INDEX] : mSecurityType[OPEN_INDEX]));
129129 /**