Use mockable supplicant delegate
This allows us to mock interactions with supplicant in unit tests.
Bug: 29620309
Test: unit/integration tests pass
Change-Id: I1526c90ffa9822a4d7dcabe5752676bfc61d6965
diff --git a/client_interface_impl.h b/client_interface_impl.h
index a60f8c5..b6334cb 100644
--- a/client_interface_impl.h
+++ b/client_interface_impl.h
@@ -21,6 +21,7 @@
#include <android-base/macros.h>
#include <utils/StrongPointer.h>
+#include <wifi_system/supplicant_manager.h>
#include "android/net/wifi/IClientInterface.h"
@@ -38,10 +39,12 @@
// keep this object separate from the binder representation of itself.
class ClientInterfaceImpl {
public:
- ClientInterfaceImpl(const std::string& interface_name,
- uint32_t interface_index,
- const std::vector<uint8_t>& interface_mac_addr,
- ScanUtils* scan_utils);
+ ClientInterfaceImpl(
+ const std::string& interface_name,
+ uint32_t interface_index,
+ const std::vector<uint8_t>& interface_mac_addr,
+ android::wifi_system::SupplicantManager* supplicant_manager,
+ ScanUtils* scan_utils);
~ClientInterfaceImpl();
// Get a pointer to the binder representing this ClientInterfaceImpl.
@@ -58,6 +61,7 @@
const std::string interface_name_;
const uint32_t interface_index_;
const std::vector<uint8_t> interface_mac_addr_;
+ android::wifi_system::SupplicantManager* const supplicant_manager_;
ScanUtils* const scan_utils_;
const android::sp<ClientInterfaceBinder> binder_;