From ec0eb424405e40735cdbe7ec8ed7caf82944e20e Mon Sep 17 00:00:00 2001 From: Sravanthi Palakonda Date: Thu, 10 Sep 2015 18:11:17 +0530 Subject: wifi: Enhance WiFi Configuration to also include sim number. For EAP SIM/AKA/AKA` authentication to happen on a specific SIM , the SIM number has to be also a part of Wi-Fi configuration . This commit ensures the same. Change-Id: I3239c534bd8d221dc0af0174304427491a1d586b CRs-Fixed: 905749 --- wifi/java/android/net/wifi/WifiConfiguration.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'wifi/java/android/net') diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java index 4cbf537..2bd1de9 100644 --- a/wifi/java/android/net/wifi/WifiConfiguration.java +++ b/wifi/java/android/net/wifi/WifiConfiguration.java @@ -60,6 +60,9 @@ public class WifiConfiguration implements Parcelable { public static final String updateIdentiferVarName = "update_identifier"; /** {@hide} */ public static final int INVALID_NETWORK_ID = -1; + /** {@hide} */ + public static final String SIMNumVarName = "sim_num"; + /** * Recognized key management schemes. @@ -426,6 +429,12 @@ public class WifiConfiguration implements Parcelable { public String autoJoinBSSID; /** + * @hide + * sim number selected + */ + public int SIMNum; + + /** * @hide * Status of user approval for connection */ @@ -929,6 +938,7 @@ public class WifiConfiguration implements Parcelable { mIpConfiguration = new IpConfiguration(); lastUpdateUid = -1; creatorUid = -1; + SIMNum = 0; } /** @@ -1088,6 +1098,10 @@ public class WifiConfiguration implements Parcelable { if (this.preSharedKey != null) { sbuf.append('*'); } + sbuf.append('\n').append(" sim_num "); + if (this.SIMNum > 0 ) { + sbuf.append('*'); + } sbuf.append("\nEnterprise config:\n"); sbuf.append(enterpriseConfig); @@ -1521,6 +1535,7 @@ public class WifiConfiguration implements Parcelable { noInternetAccessExpected = source.noInternetAccessExpected; creationTime = source.creationTime; updateTime = source.updateTime; + SIMNum = source.SIMNum; } } @@ -1600,6 +1615,7 @@ public class WifiConfiguration implements Parcelable { dest.writeInt(userApproved); dest.writeInt(numNoInternetAccessReports); dest.writeInt(noInternetAccessExpected ? 1 : 0); + dest.writeInt(SIMNum); } /** Implement the Parcelable interface {@hide} */ @@ -1676,6 +1692,7 @@ public class WifiConfiguration implements Parcelable { config.userApproved = in.readInt(); config.numNoInternetAccessReports = in.readInt(); config.noInternetAccessExpected = in.readInt() != 0; + config.SIMNum = in.readInt(); return config; } -- cgit v1.1