diff options
author | Nate Jiang <qiangjiang@google.com> | 2020-07-20 23:30:37 -0700 |
---|---|---|
committer | Nate Jiang <qiangjiang@google.com> | 2020-07-22 22:07:21 +0000 |
commit | e123f5b971d31eb9a660f1a8050128988061eb8e (patch) | |
tree | 636df17e658e3e176cc059a6912ecc30fe08c6fc /tests | |
parent | 725979457913e7addc8c6ffbd921b82011effe1e (diff) |
[Aware] dynamic enabled ranging with discovery session
Only enable aware ranging when at least one of the discovery session has
ranging enabled.
Bug: 159163836
Test: atest com.android.server.wifi
Merged-In: Iad58972e881cb44b3aabcd6235d5b8a7901e6c71
Change-Id: Iad58972e881cb44b3aabcd6235d5b8a7901e6c71
(cherry picked from commit 6a9bedadbd0629786167ef23cc145f4f3cddfb7b)
Diffstat (limited to 'tests')
4 files changed, 77 insertions, 52 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/aware/TestUtils.java b/tests/wifitests/src/com/android/server/wifi/aware/TestUtils.java index 555e89115..351bb9895 100644 --- a/tests/wifitests/src/com/android/server/wifi/aware/TestUtils.java +++ b/tests/wifitests/src/com/android/server/wifi/aware/TestUtils.java @@ -49,7 +49,7 @@ public class TestUtils { public boolean enableAndConfigure(short transactionId, ConfigRequest configRequest, boolean notifyIdentityChange, boolean initialConfiguration, boolean isInteractive, - boolean isIdle) { + boolean isIdle, boolean rangingEnabled) { addTransactionId(transactionId); return true; } diff --git a/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareDataPathStateManagerTest.java b/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareDataPathStateManagerTest.java index f496b1c95..a21442f6c 100644 --- a/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareDataPathStateManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareDataPathStateManagerTest.java @@ -1846,7 +1846,7 @@ public class WifiAwareDataPathStateManagerTest extends WifiBaseTest { if (startUpSequence) { inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); } diff --git a/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareNativeApiTest.java b/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareNativeApiTest.java index 0a30228cf..08eae1d36 100644 --- a/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareNativeApiTest.java +++ b/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareNativeApiTest.java @@ -595,7 +595,7 @@ public class WifiAwareNativeApiTest extends WifiBaseTest { mIsInterface12 = isHal12; mDut.enableAndConfigure(transactionId, configRequest, notifyIdentityChange, - initialConfiguration, isInteractive, isIdle); + initialConfiguration, isInteractive, isIdle, false); ArgumentCaptor<NanEnableRequest> enableReqCaptor = ArgumentCaptor.forClass( NanEnableRequest.class); diff --git a/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java b/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java index f5da0b2f1..7292fca36 100644 --- a/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java @@ -268,7 +268,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback1).onConnectSuccess(clientId1); @@ -369,7 +369,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -466,7 +466,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -512,7 +512,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -540,7 +540,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { InOrder inOrder = inOrder(mMockContext, mMockNative, mockCallback); when(mMockNative.enableAndConfigure(anyShort(), any(), anyBoolean(), - anyBoolean(), eq(true), eq(false))).thenReturn(false); + anyBoolean(), eq(true), eq(false), eq(false))).thenReturn(false); // (1) check initial state mDut.enableUsage(); @@ -555,7 +555,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); inOrder.verify(mockCallback).onConnectFail(NanStatusType.INTERNAL_FAILURE); validateInternalClientInfoCleanedUp(clientId); @@ -601,7 +601,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionIdCapture.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); short transactionId = transactionIdCapture.getValue(); mDut.onConfigSuccessResponse(transactionId); mMockLooper.dispatchAll(); @@ -611,7 +611,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, true); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionIdCapture.capture(), - eq(configRequest), eq(true), eq(false), eq(true), eq(false)); + eq(configRequest), eq(true), eq(false), eq(true), eq(false), eq(false)); transactionId = transactionIdCapture.getValue(); mDut.onConfigSuccessResponse(transactionId); mMockLooper.dispatchAll(); @@ -689,7 +689,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -755,7 +755,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -828,7 +828,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -912,7 +912,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -931,6 +931,12 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { inOrderM.verify(mAwareMetricsMock).recordDiscoverySessionWithRanging(eq(uid), eq(false), eq(-1), eq(-1), any()); inOrderM.verify(mAwareMetricsMock).recordDiscoveryStatus(uid, NanStatusType.SUCCESS, true); + mMockLooper.dispatchAll(); + // Verify reconfigure aware to enable ranging. + inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), + eq(false), eq(false), eq(true), eq(false), eq(true)); + mDut.onConfigSuccessResponse(transactionId.getValue()); + mMockLooper.dispatchAll(); // (3) update publish mDut.updatePublish(clientId, sessionId.getValue(), publishConfig); @@ -979,6 +985,12 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { inOrder.verify(mockSessionCallback).onSessionConfigFail(NanStatusType.INVALID_SESSION_ID); inOrderM.verify(mAwareMetricsMock).recordDiscoveryStatus(uid, NanStatusType.INVALID_SESSION_ID, true); + // Verify reconfigure aware to disable ranging. + mMockLooper.dispatchAll(); + inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), + eq(false), eq(false), eq(true), eq(false), eq(false)); + mDut.onConfigSuccessResponse(transactionId.getValue()); + mMockLooper.dispatchAll(); // (9) try updating again - do nothing/get nothing mDut.updatePublish(clientId, sessionId.getValue(), publishConfig); @@ -1024,7 +1036,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -1092,7 +1104,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -1166,7 +1178,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -1250,7 +1262,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -1269,6 +1281,12 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { inOrderM.verify(mAwareMetricsMock).recordDiscoverySessionWithRanging(eq(uid), eq(true), eq(-1), eq(rangeMax), any()); inOrderM.verify(mAwareMetricsMock).recordDiscoveryStatus(uid, NanStatusType.SUCCESS, false); + // Verify reconfigure aware to enable ranging. + mMockLooper.dispatchAll(); + inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), + eq(false), eq(false), eq(true), eq(false), eq(true)); + mDut.onConfigSuccessResponse(transactionId.getValue()); + mMockLooper.dispatchAll(); // (3) update subscribe mDut.updateSubscribe(clientId, sessionId.getValue(), subscribeConfig); @@ -1343,7 +1361,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -1426,7 +1444,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -1443,6 +1461,13 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { inOrderM.verify(mAwareMetricsMock).recordDiscoverySessionWithRanging(eq(uid), eq(true), eq(rangeMin), eq(rangeMax), any()); inOrderM.verify(mAwareMetricsMock).recordDiscoveryStatus(uid, NanStatusType.SUCCESS, false); + // Verify reconfigure aware to enable ranging. + mMockLooper.dispatchAll(); + inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), + eq(false), eq(false), eq(true), eq(false), eq(true)); + mDut.onConfigSuccessResponse(transactionId.getValue()); + mMockLooper.dispatchAll(); + // (2) 2 matches : with and w/o range mDut.onMatchNotification(subscribeId, requestorId, peerMac, peerSsi.getBytes(), @@ -1554,7 +1579,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -1658,7 +1683,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -1752,7 +1777,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -1823,7 +1848,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -1951,7 +1976,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -2040,7 +2065,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -2130,7 +2155,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -2244,7 +2269,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest1, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest1), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest1), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId1); @@ -2379,7 +2404,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -2513,7 +2538,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -2746,7 +2771,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest1, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - crCapture.capture(), eq(false), eq(true), eq(true), eq(false)); + crCapture.capture(), eq(false), eq(true), eq(true), eq(false), eq(false)); collector.checkThat("merge: stage 1", crCapture.getValue(), equalTo(configRequest1)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); @@ -2764,7 +2789,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest3, true); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - crCapture.capture(), eq(true), eq(false), eq(true), eq(false)); + crCapture.capture(), eq(true), eq(false), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback3).onConnectSuccess(clientId3); @@ -2786,7 +2811,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { mMockLooper.dispatchAll(); validateInternalClientInfoCleanedUp(clientId3); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - crCapture.capture(), eq(false), eq(false), eq(true), eq(false)); + crCapture.capture(), eq(false), eq(false), eq(true), eq(false), eq(false)); collector.checkThat("configRequest1", configRequest1, equalTo(crCapture.getValue())); @@ -2837,7 +2862,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - any(ConfigRequest.class), eq(false), eq(true), eq(true), eq(false)); + any(ConfigRequest.class), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -2855,7 +2880,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, true); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - any(ConfigRequest.class), eq(true), eq(false), eq(true), eq(false)); + any(ConfigRequest.class), eq(true), eq(false), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -2918,7 +2943,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -2995,7 +3020,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -3041,7 +3066,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); verifyNoMoreInteractions(mMockNative, mockCallback, mockSessionCallback); } @@ -3077,7 +3102,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); short transactionIdConfig = transactionId.getValue(); mDut.onConfigSuccessResponse(transactionIdConfig); mMockLooper.dispatchAll(); @@ -3135,7 +3160,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest), - eq(false), eq(true), eq(true), eq(false)); + eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -3192,7 +3217,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -3247,7 +3272,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -3303,7 +3328,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -3312,7 +3337,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { simulatePowerStateChangeInteractive(false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(false), eq(false), eq(false)); + eq(configRequest), eq(false), eq(false), eq(false), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); @@ -3320,7 +3345,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { simulatePowerStateChangeDoze(true); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(false), eq(false), eq(true)); + eq(configRequest), eq(false), eq(false), eq(false), eq(true), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); @@ -3328,7 +3353,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { simulatePowerStateChangeInteractive(true); // effectively treated as no-doze mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(false), eq(true), eq(true)); + eq(configRequest), eq(false), eq(false), eq(true), eq(true), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); @@ -3371,7 +3396,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { mMockLooper.dispatchAll(); inOrder.verify(mMockNativeManager).tryToGetAware(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -3448,7 +3473,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { mMockLooper.dispatchAll(); inOrder.verify(mMockNativeManager).tryToGetAware(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -3521,7 +3546,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { mMockLooper.dispatchAll(); inOrder.verify(mMockNativeManager).tryToGetAware(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -3591,7 +3616,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); @@ -3607,7 +3632,7 @@ public class WifiAwareStateManagerTest extends WifiBaseTest { configRequest, false); mMockLooper.dispatchAll(); inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), - eq(configRequest), eq(false), eq(true), eq(true), eq(false)); + eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false)); mDut.onConfigSuccessResponse(transactionId.getValue()); mMockLooper.dispatchAll(); inOrder.verify(mockCallback).onConnectSuccess(clientId); |