diff options
author | c_rrajiv <rrajiv@codeaurora.org> | 2015-03-25 12:12:29 +0530 |
---|---|---|
committer | AragaoAnderson <andersonaragao@me.com> | 2015-04-11 21:30:09 -0300 |
commit | 1e45f2f13c0e5b5a1d595da0df0dc57bd1aca93f (patch) | |
tree | f37eab4806fcac80354a003d2e3834f7c26372fd /service | |
parent | 3fbc07d7545ae6f1b46fe2b8e04697c4366f2dda (diff) | |
download | android_frameworks_opt_net_wifi-1e45f2f13c0e5b5a1d595da0df0dc57bd1aca93f.tar.gz android_frameworks_opt_net_wifi-1e45f2f13c0e5b5a1d595da0df0dc57bd1aca93f.tar.bz2 android_frameworks_opt_net_wifi-1e45f2f13c0e5b5a1d595da0df0dc57bd1aca93f.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: 811537
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiAutoJoinController.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiAutoJoinController.java b/service/java/com/android/server/wifi/WifiAutoJoinController.java index d7a88fbc3..c8fbc8dc9 100644 --- a/service/java/com/android/server/wifi/WifiAutoJoinController.java +++ b/service/java/com/android/server/wifi/WifiAutoJoinController.java @@ -1298,6 +1298,10 @@ public class WifiAutoJoinController { // Find the currently connected network: ask the supplicant directly String val = mWifiNative.status(true); + if (val == null) { + if (VDBG) logDbg("wpa_supplicant's STATUS command Failure"); + return false; + } String status[] = val.split("\\r?\\n"); if (VDBG) { logDbg("attemptAutoJoin() status=" + val + " split=" |