Merge change 8172 into donut
* changes: Add the phase2 field for EAP WiFi configuration.
This commit is contained in:
@ -1075,6 +1075,17 @@ public class WifiService extends IWifiManager.Stub {
|
|||||||
break setVariables;
|
break setVariables;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((config.phase2 != null) && !WifiNative.setNetworkVariableCommand(
|
||||||
|
netId,
|
||||||
|
WifiConfiguration.phase2VarName,
|
||||||
|
config.phase2)) {
|
||||||
|
if (DBG) {
|
||||||
|
Log.d(TAG, config.SSID + ": failed to set phase2: "+
|
||||||
|
config.phase2);
|
||||||
|
}
|
||||||
|
break setVariables;
|
||||||
|
}
|
||||||
|
|
||||||
if ((config.identity != null) && !WifiNative.setNetworkVariableCommand(
|
if ((config.identity != null) && !WifiNative.setNetworkVariableCommand(
|
||||||
netId,
|
netId,
|
||||||
WifiConfiguration.identityVarName,
|
WifiConfiguration.identityVarName,
|
||||||
|
@ -45,6 +45,8 @@ public class WifiConfiguration implements Parcelable {
|
|||||||
/** {@hide} */
|
/** {@hide} */
|
||||||
public static final String eapVarName = "eap";
|
public static final String eapVarName = "eap";
|
||||||
/** {@hide} */
|
/** {@hide} */
|
||||||
|
public static final String phase2VarName = "phase2";
|
||||||
|
/** {@hide} */
|
||||||
public static final String identityVarName = "identity";
|
public static final String identityVarName = "identity";
|
||||||
/** {@hide} */
|
/** {@hide} */
|
||||||
public static final String anonymousIdentityVarName = "anonymous_identity";
|
public static final String anonymousIdentityVarName = "anonymous_identity";
|
||||||
@ -272,6 +274,11 @@ public class WifiConfiguration implements Parcelable {
|
|||||||
* {@hide}
|
* {@hide}
|
||||||
*/
|
*/
|
||||||
public String eap;
|
public String eap;
|
||||||
|
/**
|
||||||
|
* The phase2 authenication could be PAP, MSCHAP, MSCHAP2, GTC.
|
||||||
|
* {@hide}
|
||||||
|
*/
|
||||||
|
public String phase2;
|
||||||
/**
|
/**
|
||||||
* The identity of the user in string,
|
* The identity of the user in string,
|
||||||
* which is used for the authentication.
|
* which is used for the authentication.
|
||||||
@ -314,6 +321,7 @@ public class WifiConfiguration implements Parcelable {
|
|||||||
for (int i = 0; i < wepKeys.length; i++)
|
for (int i = 0; i < wepKeys.length; i++)
|
||||||
wepKeys[i] = null;
|
wepKeys[i] = null;
|
||||||
eap = null;
|
eap = null;
|
||||||
|
phase2 = null;
|
||||||
identity = null;
|
identity = null;
|
||||||
anonymousIdentity = null;
|
anonymousIdentity = null;
|
||||||
password = null;
|
password = null;
|
||||||
@ -399,6 +407,10 @@ public class WifiConfiguration implements Parcelable {
|
|||||||
if (this.eap != null) {
|
if (this.eap != null) {
|
||||||
sbuf.append(eap);
|
sbuf.append(eap);
|
||||||
}
|
}
|
||||||
|
sbuf.append('\n').append(" phase2: ");
|
||||||
|
if (this.phase2 != null) {
|
||||||
|
sbuf.append(phase2);
|
||||||
|
}
|
||||||
sbuf.append('\n').append(" Identity: ");
|
sbuf.append('\n').append(" Identity: ");
|
||||||
if (this.identity != null) {
|
if (this.identity != null) {
|
||||||
sbuf.append(identity);
|
sbuf.append(identity);
|
||||||
@ -486,6 +498,7 @@ public class WifiConfiguration implements Parcelable {
|
|||||||
writeBitSet(dest, allowedPairwiseCiphers);
|
writeBitSet(dest, allowedPairwiseCiphers);
|
||||||
writeBitSet(dest, allowedGroupCiphers);
|
writeBitSet(dest, allowedGroupCiphers);
|
||||||
dest.writeString(eap);
|
dest.writeString(eap);
|
||||||
|
dest.writeString(phase2);
|
||||||
dest.writeString(identity);
|
dest.writeString(identity);
|
||||||
dest.writeString(anonymousIdentity);
|
dest.writeString(anonymousIdentity);
|
||||||
dest.writeString(password);
|
dest.writeString(password);
|
||||||
@ -516,6 +529,7 @@ public class WifiConfiguration implements Parcelable {
|
|||||||
config.allowedPairwiseCiphers = readBitSet(in);
|
config.allowedPairwiseCiphers = readBitSet(in);
|
||||||
config.allowedGroupCiphers = readBitSet(in);
|
config.allowedGroupCiphers = readBitSet(in);
|
||||||
config.eap = in.readString();
|
config.eap = in.readString();
|
||||||
|
config.phase2 = in.readString();
|
||||||
config.identity = in.readString();
|
config.identity = in.readString();
|
||||||
config.anonymousIdentity = in.readString();
|
config.anonymousIdentity = in.readString();
|
||||||
config.password = in.readString();
|
config.password = in.readString();
|
||||||
|
Reference in New Issue
Block a user