From 621745b542350fc6435bdc6d6741cbce9d1382fa Mon Sep 17 00:00:00 2001 From: Etan Cohen Date: Sat, 30 Nov 2019 18:22:22 -0800 Subject: [WIFI][MAINLINE] Transition WificondControl interfaces: PnoSettings Transition WificondControl public interfaces to that class itself. Preparation for the class being extracted to an official API. Classes shifted: API shifted to use native (wificond) PnoSettings Bug: 140062898 Test: atest android.net.wifi Test: atest com.android.server.wifi Change-Id: I8a3ddf1ebce11239e1d22e20641166cb9e8296f6 --- tests/wifitests/src/com/android/server/wifi/WifiNativeTest.java | 2 +- .../wifitests/src/com/android/server/wifi/WificondControlTest.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/wifitests/src/com/android/server/wifi/WifiNativeTest.java b/tests/wifitests/src/com/android/server/wifi/WifiNativeTest.java index c13a5fc90..73969d7a6 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiNativeTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiNativeTest.java @@ -558,7 +558,7 @@ public class WifiNativeTest extends WifiBaseTest { public void testStartPnoScan() throws Exception { mWifiNative.startPnoScan(WIFI_IFACE_NAME, TEST_PNO_SETTINGS); verify(mWificondControl).startPnoScan( - WIFI_IFACE_NAME, TEST_PNO_SETTINGS); + WIFI_IFACE_NAME, TEST_PNO_SETTINGS.toNativePnoSettings()); } /** diff --git a/tests/wifitests/src/com/android/server/wifi/WificondControlTest.java b/tests/wifitests/src/com/android/server/wifi/WificondControlTest.java index 5a0d91488..74b51add5 100644 --- a/tests/wifitests/src/com/android/server/wifi/WificondControlTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WificondControlTest.java @@ -796,7 +796,8 @@ public class WificondControlTest extends WifiBaseTest { @Test public void testStartPnoScan() throws Exception { when(mWifiScannerImpl.startPnoScan(any(PnoSettings.class))).thenReturn(true); - assertTrue(mWificondControl.startPnoScan(TEST_INTERFACE_NAME, TEST_PNO_SETTINGS)); + assertTrue(mWificondControl.startPnoScan(TEST_INTERFACE_NAME, + TEST_PNO_SETTINGS.toNativePnoSettings())); verify(mWifiScannerImpl).startPnoScan(argThat(new PnoScanMatcher(TEST_PNO_SETTINGS))); } @@ -889,7 +890,8 @@ public class WificondControlTest extends WifiBaseTest { @Test public void testStartPnoScanForMetrics() throws Exception { when(mWifiScannerImpl.startPnoScan(any(PnoSettings.class))).thenReturn(false); - assertFalse(mWificondControl.startPnoScan(TEST_INTERFACE_NAME, TEST_PNO_SETTINGS)); + assertFalse(mWificondControl.startPnoScan(TEST_INTERFACE_NAME, + TEST_PNO_SETTINGS.toNativePnoSettings())); verify(mWifiMetrics).incrementPnoScanStartAttempCount(); verify(mWifiMetrics).incrementPnoScanFailedCount(); } -- cgit v1.2.3