Remove the getHumanReadibleSsid().

Since we already push down the quotes handling in WifiService.java,
there is no need of the function.
This commit is contained in:
Chung-yih Wang
2009-10-13 18:11:52 +08:00
parent a5b7b45b6f
commit 69ea4234a0
4 changed files with 5 additions and 18 deletions

View File

@@ -223,7 +223,7 @@ public class AccessPointDialog extends AlertDialog implements DialogInterface.On
/** Called after flags are set, the dialog's layout/etc should be set up here */
private void onLayout() {
final Context context = getContext();
final String ssid = mState.getHumanReadableSsid();
final String ssid = mState.ssid;
int positiveButtonResId = 0;
int negativeButtonResId = R.string.cancel;
@@ -439,7 +439,7 @@ public class AccessPointDialog extends AlertDialog implements DialogInterface.On
}
} else if (mMode == MODE_CONFIGURE) {
String ssid = mState.getHumanReadableSsid();
String ssid = mState.ssid;
if (!TextUtils.isEmpty(ssid)) {
mSsidEdit.setText(ssid);
}

View File

@@ -48,7 +48,7 @@ public class AccessPointPreference extends Preference implements
}
public void refresh() {
setTitle(mState.getHumanReadableSsid());
setTitle(mState.ssid);
setSummary(mState.getSummarizedStatus());
notifyChanged();

View File

@@ -203,20 +203,7 @@ public final class AccessPointState implements Comparable<AccessPointState>, Par
requestRefresh();
}
}
public String getHumanReadableSsid() {
if (TextUtils.isEmpty(ssid)) {
return "";
}
final int lastPos = ssid.length() - 1;
if (ssid.charAt(0) == '"' && ssid.charAt(lastPos) == '"') {
return ssid.substring(1, lastPos);
}
return ssid;
}
public void setSsid(String ssid) {
if (ssid != null) {
this.ssid = ssid;

View File

@@ -262,7 +262,7 @@ public class WifiSettings extends PreferenceActivity implements WifiLayer.Callba
return;
}
menu.setHeaderTitle(state.getHumanReadableSsid());
menu.setHeaderTitle(state.ssid);
if (state.isConnectable()) {
menu.add(0, CONTEXT_MENU_ID_CONNECT, 0, R.string.wifi_context_menu_connect);