Add the missing phase2 field in EAP configuration.

+ Enable the password field for configuring the EAP-APs scanned.
This commit is contained in:
Chung-yih Wang
2009-07-22 11:48:33 +08:00
parent e0b5f33c68
commit b2295174dc
2 changed files with 26 additions and 8 deletions

View File

@@ -375,12 +375,22 @@ public final class AccessPointState implements Comparable<AccessPointState>, Par
/* For Enterprise Fields */
public void setEnterpriseField(int field, String value) {
if (value != null && field >= 0 && field < MAX_ENTRPRISE_FIELD) {
if ((value != null) && (field >= 0) && (field < MAX_ENTRPRISE_FIELD)) {
this.mEnterpriseFields[field] = value;
requestRefresh();
}
}
public void setPhase2(String phase2) {
if (!TextUtils.isEmpty(phase2) && (!phase2.equals("None"))) {
mPhase2 = phase2;
}
}
public String getPhase2() {
return mPhase2;
}
public void setEap(int method) {
mEap = EAP_METHOD[method];
requestRefresh();
@@ -495,6 +505,12 @@ public final class AccessPointState implements Comparable<AccessPointState>, Par
config.hiddenSSID = hiddenSsid;
config.SSID = convertToQuotedString(ssid);
config.eap = mEap;
if (!TextUtils.isEmpty(mPhase2)) {
config.phase2 = convertToQuotedString("auth=" + mPhase2);
} else {
config.phase2 = null;
}
if (!TextUtils.isEmpty(mEnterpriseFields[IDENTITY])) {
config.identity =
convertToQuotedString(mEnterpriseFields[IDENTITY]);