diff options
author | Roshan Pius <rpius@google.com> | 2017-03-03 19:32:46 -0800 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2017-03-03 19:35:00 -0800 |
commit | c7ddffabcd191c2bfd251b3d5d321e6e8f1d0bd3 (patch) | |
tree | d2562df5abc939b5926e7e3550829c49f17efa8e /service | |
parent | 6282157dd238a83e33ebd172f9c85fd97d87983e (diff) |
WifiSupplicantControl: Add missing null check for psk
Test: Compiles
Change-Id: I9968950a73527c23ad576eac8a8405d6aec309b4
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiSupplicantControl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/WifiSupplicantControl.java b/service/java/com/android/server/wifi/WifiSupplicantControl.java index a587fcd76..5b7718b89 100644 --- a/service/java/com/android/server/wifi/WifiSupplicantControl.java +++ b/service/java/com/android/server/wifi/WifiSupplicantControl.java @@ -502,7 +502,7 @@ public class WifiSupplicantControl { // Add quotes if they're not present in the provided psk. // Temporary fix until the HIDL interface is re-enabled. String preSharedKey = config.preSharedKey; - if (!preSharedKey.startsWith("\"")) { + if (!TextUtils.isEmpty(preSharedKey) && !preSharedKey.startsWith("\"")) { preSharedKey = "\"" + preSharedKey + "\""; } // Prevent client screw-up by passing in a WifiConfiguration we gave it |