Merge \\"Don\\'t save the anonymous identity for EAP-SIM/AKA/AKA-Prime\\" into nyc-mr1-dev am: 015c8a3ac0

am: 48a2b01de0

Change-Id: I2f0ead049896e67e9513340cd08443927a40542c
This commit is contained in:
Mitchell Wills
2016-06-24 20:36:44 +00:00
committed by android-build-merger

View File

@@ -375,7 +375,15 @@ public class WifiEnterpriseConfig implements Parcelable {
return false;
}
// wpa_supplicant can update the anonymous identity for these kinds of networks after
// framework reads them, so make sure the framework doesn't try to overwrite them.
boolean shouldNotWriteAnonIdentity = mEapMethod == WifiEnterpriseConfig.Eap.SIM
|| mEapMethod == WifiEnterpriseConfig.Eap.AKA
|| mEapMethod == WifiEnterpriseConfig.Eap.AKA_PRIME;
for (String key : mFields.keySet()) {
if (shouldNotWriteAnonIdentity && ANON_IDENTITY_KEY.equals(key)) {
continue;
}
if (!saver.saveValue(key, mFields.get(key))) {
return false;
}