Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93480055 authored by Yoshihiko Ikenaga's avatar Yoshihiko Ikenaga
Browse files

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: default avatarYoshihiko Ikenaga <yoshihiko.ikenaga@jp.sony.com>
parent e4163e96
Loading
Loading
Loading
Loading
+12 −1
Original line number Original line Diff line number Diff line
@@ -1364,7 +1364,18 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
                            removeClientFromList(netId, mSavedPeerConfig.deviceAddress, true);
                            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;
                        mSavedPeerConfig.netId = WifiP2pGroup.PERSISTENT_NET_ID;
                        if (connect(mSavedPeerConfig, NO_REINVOCATION) == CONNECT_FAILURE) {
                        if (connect(mSavedPeerConfig, NO_REINVOCATION) == CONNECT_FAILURE) {
                            handleGroupCreationFailure();
                            handleGroupCreationFailure();