From 5d99d8f3c9a28e526fbe1ca5d2f7d1e456baf2c7 Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Thu, 16 Aug 2018 10:51:08 -0700 Subject: 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 --- .../src/com/android/server/wifi/WifiNativeInterfaceManagementTest.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') 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); } -- cgit v1.2.3