summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorlesl <lesl@google.com>2019-12-30 21:24:01 +0800
committerLes Lee <lesl@google.com>2019-12-31 07:07:39 +0000
commitc1d2eaf646902d6512496a0e101b726b524d4978 (patch)
tree9aa39c5d0995a602e614a47d098e3b729506e0f4 /tests
parentccc72cdaf86eed51befe46c74fd9cddbba608446 (diff)
softap: Use IServiceManager to check HAL version
The HAL not only include IHostapd but also have other HAL. Correct isV1_2, let it align with isV1_1 and supplicant which use IServiceManager to check support or not. Bug: 142752869 Test: atest frameworks/opt/net/wifi/tests/wifitests/ Change-Id: I256fc78ed03a596d14fef138d58205f72d229cc9
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/HostapdHalTest.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/HostapdHalTest.java b/tests/wifitests/src/com/android/server/wifi/HostapdHalTest.java
index c7e23cd49..b87c75293 100644
--- a/tests/wifitests/src/com/android/server/wifi/HostapdHalTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/HostapdHalTest.java
@@ -187,7 +187,8 @@ public class HostapdHalTest extends WifiBaseTest {
*/
@Test
public void testInitialize_successV1_1() throws Exception {
- when(mServiceManagerMock.getTransport(anyString(), anyString()))
+ when(mServiceManagerMock.getTransport(eq(
+ android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
.thenReturn(IServiceManager.Transport.HWBINDER);
mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
executeAndValidateInitializationSequenceV1_1(false);
@@ -198,7 +199,8 @@ public class HostapdHalTest extends WifiBaseTest {
*/
@Test
public void testInitialize_registerCallbackFailureV1_1() throws Exception {
- when(mServiceManagerMock.getTransport(anyString(), anyString()))
+ when(mServiceManagerMock.getTransport(eq(
+ android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
.thenReturn(IServiceManager.Transport.HWBINDER);
mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
executeAndValidateInitializationSequenceV1_1(true);
@@ -482,7 +484,8 @@ public class HostapdHalTest extends WifiBaseTest {
*/
@Test
public void testAddAccessPointSuccess_Psk_BandAny_WithACS_AcsChannels() throws Exception {
- when(mServiceManagerMock.getTransport(anyString(), anyString()))
+ when(mServiceManagerMock.getTransport(eq(
+ android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
.thenReturn(IServiceManager.Transport.HWBINDER);
mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
// Enable ACS and set available channels in the config.
@@ -622,7 +625,8 @@ public class HostapdHalTest extends WifiBaseTest {
*/
@Test
public void testOnFailureCallbackHandling() throws Exception {
- when(mServiceManagerMock.getTransport(anyString(), anyString()))
+ when(mServiceManagerMock.getTransport(eq(
+ android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
.thenReturn(IServiceManager.Transport.HWBINDER);
mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
when(mIHostapdMockV11.addAccessPoint_1_1(