summaryrefslogtreecommitdiffstats
path: root/wifi/java/android/net/wifi/p2p
diff options
context:
space:
mode:
authorYoshihiko Ikenaga <yoshihiko.ikenaga@jp.sony.com>2012-11-16 18:01:49 +0900
committerYoshihiko Ikenaga <yoshihiko.ikenaga@jp.sony.com>2012-11-28 09:52:06 +0900
commit9348005545403037ab1b93aea6f52055516377bf (patch)
tree062d4e4db96f8a0941d33a71973539e1a9853525 /wifi/java/android/net/wifi/p2p
parente4163e96e0ee31c6e78434114cc1dcf4cd3ab5bd (diff)
downloadframeworks_base-9348005545403037ab1b93aea6f52055516377bf.zip
frameworks_base-9348005545403037ab1b93aea6f52055516377bf.tar.gz
frameworks_base-9348005545403037ab1b93aea6f52055516377bf.tar.bz2
Try go-negotiation when invocation request is deferred.
Devices setting persistent_reconnect to 0 in wpa_supplicant returns "information is currently unable" error. In that case, the connection establishment was always failed when the other device does NOT handle the invitation request. So, try go-negotiation for interoperability. Change-Id: Ia30a1c63d1bb4acc186a71248fb0aa5ea7edc627 Signed-off-by: Yoshihiko Ikenaga <yoshihiko.ikenaga@jp.sony.com>
Diffstat (limited to 'wifi/java/android/net/wifi/p2p')
-rw-r--r--wifi/java/android/net/wifi/p2p/WifiP2pService.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
index 4a4320c..f2f61e7 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
@@ -1364,7 +1364,18 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
removeClientFromList(netId, mSavedPeerConfig.deviceAddress, true);
}
- // invocation is failed or deferred. Try another way to connect.
+ // invocation is failed. Try another way to connect.
+ mSavedPeerConfig.netId = WifiP2pGroup.PERSISTENT_NET_ID;
+ if (connect(mSavedPeerConfig, NO_REINVOCATION) == CONNECT_FAILURE) {
+ handleGroupCreationFailure();
+ transitionTo(mInactiveState);
+ }
+ } else if (status == P2pStatus.INFORMATION_IS_CURRENTLY_UNAVAILABLE) {
+
+ // Devices setting persistent_reconnect to 0 in wpa_supplicant
+ // always defer the invocation request and return
+ // "information is currently unable" error.
+ // So, try another way to connect for interoperability.
mSavedPeerConfig.netId = WifiP2pGroup.PERSISTENT_NET_ID;
if (connect(mSavedPeerConfig, NO_REINVOCATION) == CONNECT_FAILURE) {
handleGroupCreationFailure();