summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorSunil Dutt <usdutt@qti.qualcomm.com>2016-03-09 21:44:02 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-03-09 21:44:02 +0000
commit143d50d011d4a26ff5402fc6b3ff19f945ff7153 (patch)
tree954d40800a61b785ee360177abd89bf97379d9f1 /service
parentb409fc8e164c522275e1df302a37e05662163004 (diff)
parente5da466fd5d9d8024780590ee8b1c335889443a7 (diff)
Merge "Wifi: send an explicit ENABLE_NETWORK with "no-connect"" into mm-wireless-dev
am: e5da466fd5 * commit 'e5da466fd5d9d8024780590ee8b1c335889443a7': Wifi: send an explicit ENABLE_NETWORK with "no-connect"
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiConfigStore.java2
-rw-r--r--service/java/com/android/server/wifi/WifiNative.java10
2 files changed, 11 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigStore.java b/service/java/com/android/server/wifi/WifiConfigStore.java
index 73ccd3b26..431ca2ca8 100644
--- a/service/java/com/android/server/wifi/WifiConfigStore.java
+++ b/service/java/com/android/server/wifi/WifiConfigStore.java
@@ -910,7 +910,7 @@ public class WifiConfigStore {
return false;
}
if (VDBG) localLog("enableNetwork: " + config.networkId);
- if (!mWifiNative.enableNetwork(config.networkId)) {
+ if (!mWifiNative.enableNetworkWithoutConnect(config.networkId)) {
loge("Enable network in wpa_supplicant failed on " + config.networkId);
return false;
}
diff --git a/service/java/com/android/server/wifi/WifiNative.java b/service/java/com/android/server/wifi/WifiNative.java
index 9cd9235fe..c3afa3899 100644
--- a/service/java/com/android/server/wifi/WifiNative.java
+++ b/service/java/com/android/server/wifi/WifiNative.java
@@ -487,6 +487,16 @@ public class WifiNative {
}
/**
+ * Enable a network in wpa_supplicant, do not connect.
+ * @param netId - Network ID of the network to be enabled.
+ * @return true if command succeeded, false otherwise.
+ */
+ public boolean enableNetworkWithoutConnect(int netId) {
+ if (DBG) logDbg("enableNetworkWithoutConnect nid=" + Integer.toString(netId));
+ return doBooleanCommand("ENABLE_NETWORK " + netId + " " + "no-connect");
+ }
+
+ /**
* Disables a network in wpa_supplicant.
* @param netId - Network ID of the network to be disabled.
* @return true if command succeeded, false otherwise.