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:
@@ -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 */
|
/** Called after flags are set, the dialog's layout/etc should be set up here */
|
||||||
private void onLayout() {
|
private void onLayout() {
|
||||||
final Context context = getContext();
|
final Context context = getContext();
|
||||||
final String ssid = mState.getHumanReadableSsid();
|
final String ssid = mState.ssid;
|
||||||
|
|
||||||
int positiveButtonResId = 0;
|
int positiveButtonResId = 0;
|
||||||
int negativeButtonResId = R.string.cancel;
|
int negativeButtonResId = R.string.cancel;
|
||||||
@@ -439,7 +439,7 @@ public class AccessPointDialog extends AlertDialog implements DialogInterface.On
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else if (mMode == MODE_CONFIGURE) {
|
} else if (mMode == MODE_CONFIGURE) {
|
||||||
String ssid = mState.getHumanReadableSsid();
|
String ssid = mState.ssid;
|
||||||
if (!TextUtils.isEmpty(ssid)) {
|
if (!TextUtils.isEmpty(ssid)) {
|
||||||
mSsidEdit.setText(ssid);
|
mSsidEdit.setText(ssid);
|
||||||
}
|
}
|
||||||
|
@@ -48,7 +48,7 @@ public class AccessPointPreference extends Preference implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void refresh() {
|
public void refresh() {
|
||||||
setTitle(mState.getHumanReadableSsid());
|
setTitle(mState.ssid);
|
||||||
setSummary(mState.getSummarizedStatus());
|
setSummary(mState.getSummarizedStatus());
|
||||||
|
|
||||||
notifyChanged();
|
notifyChanged();
|
||||||
|
@@ -203,20 +203,7 @@ public final class AccessPointState implements Comparable<AccessPointState>, Par
|
|||||||
requestRefresh();
|
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) {
|
public void setSsid(String ssid) {
|
||||||
if (ssid != null) {
|
if (ssid != null) {
|
||||||
this.ssid = ssid;
|
this.ssid = ssid;
|
||||||
|
@@ -262,7 +262,7 @@ public class WifiSettings extends PreferenceActivity implements WifiLayer.Callba
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu.setHeaderTitle(state.getHumanReadableSsid());
|
menu.setHeaderTitle(state.ssid);
|
||||||
|
|
||||||
if (state.isConnectable()) {
|
if (state.isConnectable()) {
|
||||||
menu.add(0, CONTEXT_MENU_ID_CONNECT, 0, R.string.wifi_context_menu_connect);
|
menu.add(0, CONTEXT_MENU_ID_CONNECT, 0, R.string.wifi_context_menu_connect);
|
||||||
|
Reference in New Issue
Block a user