From db4192ada9dee591ec897a51c07c489c84c860c1 Mon Sep 17 00:00:00 2001 From: Matt Buckley Date: Thu, 21 Dec 2023 20:00:32 +0000 Subject: Add support for new PowerHAL methods to PowerHalWrapper This patch adds FMQ support, createHintSessionWithConfig support, and refactors the class structure slightly to allow wrapper subclasses to share unsupported method logic with EmptyHalWrapper Bug: 317387260 Test: atest libpowermanager_test libsurfaceflinger_unittest libcompositionengine_test Change-Id: I53b67055b3ada4dc8576533a9b961ff5ec3367a5 --- include/powermanager/PowerHalController.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/powermanager/PowerHalController.h') diff --git a/include/powermanager/PowerHalController.h b/include/powermanager/PowerHalController.h index 9e426d3ea3..c50bc4a188 100644 --- a/include/powermanager/PowerHalController.h +++ b/include/powermanager/PowerHalController.h @@ -62,7 +62,15 @@ public: virtual HalResult> createHintSession(int32_t tgid, int32_t uid, const std::vector& threadIds, int64_t durationNanos) override; + virtual HalResult> + createHintSessionWithConfig(int32_t tgid, int32_t uid, const std::vector& threadIds, + int64_t durationNanos, + aidl::android::hardware::power::SessionTag tag, + aidl::android::hardware::power::SessionConfig* config) override; virtual HalResult getHintSessionPreferredRate() override; + virtual HalResult getSessionChannel( + int tgid, int uid) override; + virtual HalResult closeSessionChannel(int tgid, int uid) override; private: std::mutex mConnectedHalMutex; @@ -75,7 +83,7 @@ private: std::shared_ptr initHal(); template - HalResult processHalResult(HalResult result, const char* functionName); + HalResult processHalResult(HalResult&& result, const char* functionName); }; // ------------------------------------------------------------------------------------------------- -- cgit v1.2.3-59-g8ed1b