diff options
author | Kenny Root <kroot@google.com> | 2012-03-29 17:19:42 -0700 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2012-03-29 17:25:24 -0700 |
commit | 4e62fd3f95ee824e6addf438f9e1155a8e0b8e2a (patch) | |
tree | 79fc9b97edbfd5538330e7a7fadbf690fa624e4a /wifi | |
parent | b956ef3a38a5f716fe8c437dadeabe8a4ff182c3 (diff) | |
download | frameworks_base-4e62fd3f95ee824e6addf438f9e1155a8e0b8e2a.zip frameworks_base-4e62fd3f95ee824e6addf438f9e1155a8e0b8e2a.tar.gz frameworks_base-4e62fd3f95ee824e6addf438f9e1155a8e0b8e2a.tar.bz2 |
Wifi: change empty "engine" config to integer
"engine" is specified as an integer in wpa_supplicant, so we have to
make sure we send an integer instead of a NULL when we want to disable
it.
Bug: 6250670
Change-Id: I693ccb49badbd400a5882e9df1bbd4febc847a6e
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/java/android/net/wifi/WifiConfigStore.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/wifi/java/android/net/wifi/WifiConfigStore.java b/wifi/java/android/net/wifi/WifiConfigStore.java index a9dbd10..3c761c8 100644 --- a/wifi/java/android/net/wifi/WifiConfigStore.java +++ b/wifi/java/android/net/wifi/WifiConfigStore.java @@ -1141,7 +1141,15 @@ class WifiConfigStore { String varName = field.varName(); String value = field.value(); if (value != null) { - if (field != config.eap && field != config.engine) { + if (field == config.engine) { + /* + * If the field is declared as an integer, it must not + * be null + */ + if (value.length() == 0) { + value = "0"; + } + } else if (field != config.eap) { value = (value.length() == 0) ? "NULL" : convertToQuotedString(value); } if (!mWifiNative.setNetworkVariable( |