diff options
author | c_rrajiv <rrajiv@codeaurora.org> | 2015-03-25 12:12:29 +0530 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-05-18 14:31:40 -0700 |
commit | e848c982ea10df2cfa4207817b38ba17ab2f3b64 (patch) | |
tree | 0ee2ac2439f8c4c9d2e1462df9bf0bf108c38173 /service | |
parent | 901aac2ba8c64c35811424425bbeb01c895484e3 (diff) | |
download | frameworks_opt_net_wifi-e848c982ea10df2cfa4207817b38ba17ab2f3b64.tar.gz frameworks_opt_net_wifi-e848c982ea10df2cfa4207817b38ba17ab2f3b64.tar.bz2 frameworks_opt_net_wifi-e848c982ea10df2cfa4207817b38ba17ab2f3b64.zip |
wifi: Handle the NULL check for the STATUS command
STATUS command is issued to the supplicant to get the currently connected
network status. The current code does not consider the failure scenario
(NULL check) for the obtained response and this commit handles the same.
Change-Id: I4d90386bf8d909c97cacdf5b9c80e07a679d63ee
CRs-Fixed: 930365
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiAutoJoinController.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiAutoJoinController.java b/service/java/com/android/server/wifi/WifiAutoJoinController.java index e525949..58e15a0 100644 --- a/service/java/com/android/server/wifi/WifiAutoJoinController.java +++ b/service/java/com/android/server/wifi/WifiAutoJoinController.java @@ -1533,6 +1533,12 @@ public class WifiAutoJoinController { // Find the currently connected network: ask the supplicant directly int supplicantNetId = getNetID(mWifiNative.status(true)); + if (supplicantNetId == WifiConfiguration.INVALID_NETWORK_ID) { + if (VDBG) { + logDbg("attemptAutoJoin getNetID returned invalid supplicantNetId"); + } + return false; + } if (DBG) { String conf = ""; |