summaryrefslogtreecommitdiffstats
path: root/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2017-05-12 16:45:05 -0700
committerRoshan Pius <rpius@google.com>2017-05-17 23:16:36 +0000
commit8131b04dc799cb0c75240c7b9eb0517ba1f00be8 (patch)
tree609b6180e75fa17f8a45af2a52a01d3f341894e5 /tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
parent0c96f88c6d9f031ab76392cdb1255bd249212ad3 (diff)
downloadandroid_frameworks_opt_net_wifi-8131b04dc799cb0c75240c7b9eb0517ba1f00be8.tar.gz
android_frameworks_opt_net_wifi-8131b04dc799cb0c75240c7b9eb0517ba1f00be8.tar.bz2
android_frameworks_opt_net_wifi-8131b04dc799cb0c75240c7b9eb0517ba1f00be8.zip
WifiNative: Add VINTF check for vendor HAL
Currently, we're ignoring HAL start failures to support devices like gce, hikey which did not have any vendor HAL support previously. To solve that problem: 1. Remove the Vendor HAL daemon (HIDL shim) from such device's device.mk. Handled by other CL's in the topic. 2. Add the Wifi HAL's to the VINTF (manifest.xml) on all devices which has the Vendor HAL daemon running. (Unfortunately, there is no automatic translation from the module missing in device.mk to manifest.xml currently). Handled by other CL's in the topic. 3. Use the HalDeviceManager to query the VINTF to figure out if the Vendor HAL is present on the device or not. 4a. If the Vendor HAL is not supported, ignore start/stop calls. 4b. If the Vendor HAL is present, report failure if start/stop fails. Also, fixed a few invalid mock expectations set. Bug: 36886769 Test: Device boots up and connects to wifi on 2017 devices. Test: Unit tests. Change-Id: Ia3d90c8fafe2f8c156c843f5f47b94deaabe5a56 (cherry picked from commit 30f34829e0e7e49dc09c897c72dd0ded7d9805eb)
Diffstat (limited to 'tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java8
1 files changed, 0 insertions, 8 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java b/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
index fc55266ad..dc34e3538 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
@@ -521,14 +521,12 @@ public class WifiStateMachineTest {
@Test
public void loadComponentsFailure() throws Exception {
- when(mWifiNative.startHal(anyBoolean())).thenReturn(false);
when(mWifiNative.enableSupplicant()).thenReturn(false);
mWsm.setSupplicantRunning(true);
mLooper.dispatchAll();
assertEquals("InitialState", getCurrentState().getName());
- when(mWifiNative.startHal(anyBoolean())).thenReturn(true);
mWsm.setSupplicantRunning(true);
mLooper.dispatchAll();
assertEquals("InitialState", getCurrentState().getName());
@@ -548,8 +546,6 @@ public class WifiStateMachineTest {
@Test
public void shouldStartSupplicantWhenConnectModeRequested() throws Exception {
- when(mWifiNative.startHal(anyBoolean())).thenReturn(true);
-
// The first time we start out in InitialState, we sit around here.
mLooper.dispatchAll();
assertEquals("InitialState", getCurrentState().getName());
@@ -566,8 +562,6 @@ public class WifiStateMachineTest {
*/
@Test
public void checkIsWifiEnabledForModeChanges() throws Exception {
- when(mWifiNative.startHal(anyBoolean())).thenReturn(true);
-
// Check initial state
mLooper.dispatchAll();
assertEquals("InitialState", getCurrentState().getName());
@@ -638,8 +632,6 @@ public class WifiStateMachineTest {
*/
@Test
public void checkStartInCorrectStateAfterChangingInitialState() throws Exception {
- when(mWifiNative.startHal(anyBoolean())).thenReturn(true);
-
// Check initial state
mLooper.dispatchAll();
assertEquals("InitialState", getCurrentState().getName());