summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2018-08-16 10:51:08 -0700
committerRoshan Pius <rpius@google.com>2018-08-28 18:07:37 +0000
commit5d99d8f3c9a28e526fbe1ca5d2f7d1e456baf2c7 (patch)
treebdf0a7968368aa12f842b2f7cfceedd2102180f6 /tests
parent42850d8d6cf94f8b35d5fd925b616cb6fa92cc53 (diff)
WifiNative: Enable Wifimonitor in scan mode
Even though WifiMonitor was generally designed for handling supplicant (which is not running in scan mode now) events, there are a couple of wificond related events using WifiMonitor. Wificond events include scan completed event. So, even though the scan was completed by wificond, the events were not getting delivered to WifiScanningService. Note: This was a regression introduced by ag/4376305. Not sure why this wasn't caught in the integration tests for that CL. Bug: 112442032 Test: Unit tests Test: testWifiManagerScanWhenWifiOffLocationTurnedOn CTS test passes now. Change-Id: I961703e54322bbd9748d2816c1c781e3de715c0d
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiNativeInterfaceManagementTest.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiNativeInterfaceManagementTest.java b/tests/wifitests/src/com/android/server/wifi/WifiNativeInterfaceManagementTest.java
index ce67b3510..284ffdb06 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiNativeInterfaceManagementTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiNativeInterfaceManagementTest.java
@@ -1357,6 +1357,7 @@ public class WifiNativeInterfaceManagementTest {
destroyedListenerCaptor.capture());
mInOrder.verify(mWificondControl).setupInterfaceForClientMode(ifaceName);
mInOrder.verify(mNwManagementService).registerObserver(networkObserverCaptor.capture());
+ mInOrder.verify(mWifiMonitor).startMonitoring(ifaceName);
mInOrder.verify(mNwManagementService).getInterfaceConfig(ifaceName);
}
@@ -1381,6 +1382,7 @@ public class WifiNativeInterfaceManagementTest {
boolean anyOtherStaIface, boolean anyOtherApIface,
String ifaceName, @Mock WifiNative.InterfaceCallback callback,
BaseNetworkObserver networkObserver) throws Exception {
+ mInOrder.verify(mWifiMonitor).stopMonitoring(ifaceName);
if (networkObserver != null) {
mInOrder.verify(mNwManagementService).unregisterObserver(networkObserver);
}