diff options
author | Sravanthi Palakonda <srapal@codeaurora.org> | 2016-06-17 19:21:22 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2016-08-24 08:07:56 -0600 |
commit | d428f2628534597f089f1025b94a943841e3262a (patch) | |
tree | f0c3e852ea9e6d15552e054d29ecc02b1272732a | |
parent | fdf3d59d8a923a95cf545dcbfcc35c23756df130 (diff) | |
download | android_frameworks_opt_net_wifi-d428f2628534597f089f1025b94a943841e3262a.tar.gz android_frameworks_opt_net_wifi-d428f2628534597f089f1025b94a943841e3262a.tar.bz2 android_frameworks_opt_net_wifi-d428f2628534597f089f1025b94a943841e3262a.zip |
wifi:Provision to configure the SIM number for EAP SIM / AKA type
For EAP SIM/AKA/AKA` authentication to happen on a specific SIM , the
SIM number has to be specified to supplicant . This commit ensures the
same.
Change-Id: I1a92c2115c9f1fc2f025b2b4ae3044ecd35e6bb2
CRs-Fixed: 1030713
-rw-r--r-- | service/java/com/android/server/wifi/WifiConfigStore.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigStore.java b/service/java/com/android/server/wifi/WifiConfigStore.java index 25ab4493b..b32d0af25 100644 --- a/service/java/com/android/server/wifi/WifiConfigStore.java +++ b/service/java/com/android/server/wifi/WifiConfigStore.java @@ -279,6 +279,15 @@ public class WifiConfigStore { config.getNetworkSelectionStatus().setNetworkSelectionBSSID(null); } + value = mWifiNative.getNetworkVariable(netId, WifiConfiguration.SIMNumVarName); + if (!TextUtils.isEmpty(value)) { + try { + config.SIMNum = Integer.parseInt(value); + } catch (NumberFormatException ignore) { + Log.e(TAG,"error in parsing Selected Sim number " + config.SIMNum); + } + } + value = mWifiNative.getNetworkVariable(netId, WifiConfiguration.priorityVarName); config.priority = -1; if (!TextUtils.isEmpty(value)) { @@ -714,6 +723,13 @@ public class WifiConfigStore { return false; } } + if (config.SIMNum != 0 && !mWifiNative.setNetworkVariable( + netId, + WifiConfiguration.SIMNumVarName, + Integer.toString(config.SIMNum))) { + loge(config.SIMNum + ": failed to set sim no: " + config.SIMNum); + return false; + } if (!mWifiNative.setNetworkVariable( netId, WifiConfiguration.priorityVarName, |