diff options
author | Sravanthi Palakonda <srapal@codeaurora.org> | 2015-01-13 16:50:55 +0530 |
---|---|---|
committer | Sravanthi Palakonda <srapal@codeaurora.org> | 2015-01-14 19:35:23 +0530 |
commit | 81ad2179f41a9592ff7ec330c93d3ab21e63725d (patch) | |
tree | 05cecc98a05cb9684f2238623e405a0ce79698b1 /service/java/com/android/server/wifi/WifiConfigStore.java | |
parent | ae78221ce2fb27dd978ec1f8714389adb9605414 (diff) | |
download | android_frameworks_opt_net_wifi-81ad2179f41a9592ff7ec330c93d3ab21e63725d.tar.gz android_frameworks_opt_net_wifi-81ad2179f41a9592ff7ec330c93d3ab21e63725d.tar.bz2 android_frameworks_opt_net_wifi-81ad2179f41a9592ff7ec330c93d3ab21e63725d.zip |
wifi: Do not update conf file with the default sim_num value
When Wi-Fi is turned On with saved profile, the framework
will over write the existing sim_num value with the default
value. Due to which, the supplicant will always try to
authenticate with the default sim_num value (i.e., 1).
To mitigate this, update the conf file only if sim_num has
non zero values.
Change-Id: I2c17944d44f5937974593c91ef27ed0dc39ece38
CRs-Fixed: 780903
Diffstat (limited to 'service/java/com/android/server/wifi/WifiConfigStore.java')
-rwxr-xr-x | service/java/com/android/server/wifi/WifiConfigStore.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigStore.java b/service/java/com/android/server/wifi/WifiConfigStore.java index ffcb5c4a0..53b501ca0 100755 --- a/service/java/com/android/server/wifi/WifiConfigStore.java +++ b/service/java/com/android/server/wifi/WifiConfigStore.java @@ -2653,13 +2653,15 @@ public class WifiConfigStore extends IpConfigStore { } } - if (!mWifiNative.setNetworkVariable( - netId, - WifiConfiguration.SIMNumVarName, - Integer.toString(config.SIMNum))) { - loge(config.SIMNum + ": failed to set sim no: " - +config.SIMNum); - break setVariables; + if (config.SIMNum != 0) { + if (!mWifiNative.setNetworkVariable( + netId, + WifiConfiguration.SIMNumVarName, + Integer.toString(config.SIMNum))) { + loge(config.SIMNum + ": failed to set sim no: " + +config.SIMNum); + break setVariables; + } } String allowedKeyManagementString = |