diff options
author | Etan Cohen <etancohen@google.com> | 2018-03-15 16:35:45 -0700 |
---|---|---|
committer | Etan Cohen <etancohen@google.com> | 2018-03-15 16:35:45 -0700 |
commit | e20a4beebdc237bfd7d74c95256d066a3efbc3d9 (patch) | |
tree | 4315c929b0c1cb8ee7859cff73a7d37a77b13a7b | |
parent | 6ef9e33f9bd16064df5f5696731f36f8fab286ae (diff) |
[AWARE] Fix interface selection when have a request to any
Interface selection uses the peer NMI to determine whether or not we can
share an existing interface. When there is a request to ANY (null NMI)
the result was that we selected an existing interface.
Bug: 73947486
Test: unit tests + integration tests DataPathTest
Change-Id: I23ca818ccf406cdb787eee2ed442b61cf3fb81cc
-rw-r--r-- | service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java b/service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java index f2d8e3b25..c6b1ae8d2 100644 --- a/service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java +++ b/service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java @@ -373,6 +373,10 @@ public class WifiAwareDataPathStateManager { return null; } + if (nnri.peerDiscoveryMac == null) { + // the "accept anyone" request is now specific + nnri.peerDiscoveryMac = mac; + } nnri.interfaceName = selectInterfaceForRequest(nnri); if (nnri.interfaceName == null) { Log.w(TAG, @@ -385,10 +389,6 @@ public class WifiAwareDataPathStateManager { nnri.state = AwareNetworkRequestInformation.STATE_RESPONDER_WAIT_FOR_RESPOND_RESPONSE; nnri.ndpId = ndpId; nnri.startTimestamp = SystemClock.elapsedRealtime(); - if (nnri.peerDiscoveryMac == null) { - // the "accept anyone" request is now specific - nnri.peerDiscoveryMac = mac; - } mMgr.respondToDataPathRequest(true, ndpId, nnri.interfaceName, nnri.networkSpecifier.pmk, nnri.networkSpecifier.passphrase, nnri.networkSpecifier.isOutOfBand()); |