summaryrefslogtreecommitdiff
path: root/include/powermanager
diff options
context:
space:
mode:
author Xiang Wang <xwxw@google.com> 2023-05-19 20:39:30 -0700
committer Xiang Wang <xwxw@google.com> 2023-05-31 00:32:18 +0000
commit74978e1da00f9865ec8653b4daad34cd66fb9307 (patch)
tree16d9a585c5adcf1a365f6b8389a636796fc5570b /include/powermanager
parent635339c548ddfe13b5d926b543f4f41055513e62 (diff)
Mock init of PowerHalController in test
We have injected a MockedPowerHalController in PowerAdvisorTest, but it will always run init once, which will try to connect a real PowerHAL. This was resulting in a few error logs like SELinux denials. Bug: 280438886 Test: libsurfaceflinger_unittest Change-Id: Icbd0289cbeba95582eed01e61dcb748e2e167c24
Diffstat (limited to 'include/powermanager')
-rw-r--r--include/powermanager/PowerHalController.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/powermanager/PowerHalController.h b/include/powermanager/PowerHalController.h
index 71a36d09e5..82e4551c3c 100644
--- a/include/powermanager/PowerHalController.h
+++ b/include/powermanager/PowerHalController.h
@@ -53,7 +53,7 @@ public:
: 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;