Merge "Mock init of PowerHalController in test" into udc-qpr-dev am: 30f0d321c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/23483476
Change-Id: Ic44a3675c1e734a3bd580e354bc519a5a69e57e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/include/powermanager/PowerHalController.h b/include/powermanager/PowerHalController.h
index 71a36d0..82e4551 100644
--- a/include/powermanager/PowerHalController.h
+++ b/include/powermanager/PowerHalController.h
@@ -53,7 +53,7 @@
: mHalConnector(std::move(connector)) {}
virtual ~PowerHalController() = default;
- void init();
+ virtual void init();
virtual HalResult<void> setBoost(hardware::power::Boost boost, int32_t durationMs) override;
virtual HalResult<void> setMode(hardware::power::Mode mode, bool enabled) override;
diff --git a/services/surfaceflinger/tests/unittests/mock/DisplayHardware/MockPowerHalController.h b/services/surfaceflinger/tests/unittests/mock/DisplayHardware/MockPowerHalController.h
index 358395d..8e22f43 100644
--- a/services/surfaceflinger/tests/unittests/mock/DisplayHardware/MockPowerHalController.h
+++ b/services/surfaceflinger/tests/unittests/mock/DisplayHardware/MockPowerHalController.h
@@ -39,6 +39,7 @@
public:
MockPowerHalController();
~MockPowerHalController() override;
+ MOCK_METHOD(void, init, (), (override));
MOCK_METHOD(HalResult<void>, setBoost, (Boost, int32_t), (override));
MOCK_METHOD(HalResult<void>, setMode, (Mode, bool), (override));
MOCK_METHOD(HalResult<sp<hardware::power::IPowerHintSession>>, createHintSession,