summaryrefslogtreecommitdiffstats
path: root/wifi/java/android/net/wifi/p2p
diff options
context:
space:
mode:
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 be5cdad..30764fb 100644
--- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java
+++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java
@@ -1375,7 +1375,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();