summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/wifi/AccessPointState.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/settings/wifi/AccessPointState.java')
-rw-r--r--src/com/android/settings/wifi/AccessPointState.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/com/android/settings/wifi/AccessPointState.java b/src/com/android/settings/wifi/AccessPointState.java
index 8fb651b..899c304 100644
--- a/src/com/android/settings/wifi/AccessPointState.java
+++ b/src/com/android/settings/wifi/AccessPointState.java
@@ -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]);