From 1cd82a8cf28a5c0c8e9e0fcd2769e91fb50274b3 Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Mon, 25 Mar 2019 13:51:28 -0700 Subject: [PATCH] wifi(implementation): Fix unit test failures ag/6722341 caused some unit test failures. Fixing them. Bug: 127715974 Test: ./data/android.hardware.wifi@1.0-service-tests Change-Id: Ib504cf55b9990dba081eb1b07bc32508e09ad0a6 --- wifi/1.3/default/tests/mock_wifi_legacy_hal.h | 4 ++++ wifi/1.3/default/wifi_legacy_hal.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/wifi/1.3/default/tests/mock_wifi_legacy_hal.h b/wifi/1.3/default/tests/mock_wifi_legacy_hal.h index deb3a5ae4b..65fd115781 100644 --- a/wifi/1.3/default/tests/mock_wifi_legacy_hal.h +++ b/wifi/1.3/default/tests/mock_wifi_legacy_hal.h @@ -39,6 +39,10 @@ class MockWifiLegacyHal : public WifiLegacyHal { MOCK_METHOD2(registerRadioModeChangeCallbackHandler, wifi_error(const std::string&, const on_radio_mode_change_callback&)); + MOCK_METHOD1(getFirmwareVersion, std::pair( + const std::string& iface_name)); + MOCK_METHOD1(getDriverVersion, std::pair( + const std::string& iface_name)); MOCK_METHOD2(nanRegisterCallbackHandlers, wifi_error(const std::string&, const NanCallbackHandlers&)); MOCK_METHOD2(nanDisableRequest, diff --git a/wifi/1.3/default/wifi_legacy_hal.h b/wifi/1.3/default/wifi_legacy_hal.h index 70a919f8ce..4d6beb3da1 100644 --- a/wifi/1.3/default/wifi_legacy_hal.h +++ b/wifi/1.3/default/wifi_legacy_hal.h @@ -184,9 +184,9 @@ class WifiLegacyHal { // Checks if legacy HAL has successfully started bool isStarted(); // Wrappers for all the functions in the legacy HAL function table. - std::pair getDriverVersion( + virtual std::pair getDriverVersion( const std::string& iface_name); - std::pair getFirmwareVersion( + virtual std::pair getFirmwareVersion( const std::string& iface_name); std::pair> requestDriverMemoryDump( const std::string& iface_name);