summaryrefslogtreecommitdiffstats
path: root/wifi/java
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2012-03-02 12:24:44 -0800
committerIrfan Sheriff <isheriff@google.com>2012-03-02 12:24:44 -0800
commitab26407124cf861eacfe7bf0f2a1ef25f4b3a7bd (patch)
tree94d0d265ee18aee1cff1a873cea6a3f3427eaa51 /wifi/java
parent1a7dd039f189036709bc2253ba50955913f59d7a (diff)
downloadframeworks_base-ab26407124cf861eacfe7bf0f2a1ef25f4b3a7bd.zip
frameworks_base-ab26407124cf861eacfe7bf0f2a1ef25f4b3a7bd.tar.gz
frameworks_base-ab26407124cf861eacfe7bf0f2a1ef25f4b3a7bd.tar.bz2
Fix connect on a network id with zero
Pass invalid network id on arg1 when using a config object Change-Id: I8ef047c951911324d9bf79b744c3e7122bb73bae
Diffstat (limited to 'wifi/java')
-rw-r--r--wifi/java/android/net/wifi/WifiManager.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index bdee12a..54dc047 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -1289,7 +1289,10 @@ public class WifiManager {
if (c == null) throw new IllegalArgumentException("Channel needs to be initialized");
if (config == null) throw new IllegalArgumentException("config cannot be null");
- c.mAsyncChannel.sendMessage(CONNECT_NETWORK, 0, c.putListener(listener), config);
+ // Use INVALID_NETWORK_ID for arg1 when passing a config object
+ // arg1 is used to pass network id when the network already exists
+ c.mAsyncChannel.sendMessage(CONNECT_NETWORK, WifiConfiguration.INVALID_NETWORK_ID,
+ c.putListener(listener), config);
}
/**