summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Matt Buckley <mattbuckley@google.com> 2024-10-18 11:58:01 -0700
committer Matt Buckley <mattbuckley@google.com> 2024-10-18 13:37:19 -0700
commit11b98f28da29dcc8e7ae4bb311ccbd00f83d7b73 (patch)
treedb25abefaa6ac0cdfb950b792030fa36f04cff0a
parentc0bc4ae90f4e1e53bfbb3f0c90818b1c0a9927c8 (diff)
Add HAL method to return SupportInfo object for PowerHAL
Add a way for the PowerHAL to return a single official, canonical support object for all of the things it does or doesn't support, alleviating the need for continued plumbing here by consolidating all of the info into one place. Test: atest VtsHalPowerTargetTest Bug: 367803904 Flag: EXEMPT HAL interface change Change-Id: I567a44ccc84575779ad3083f82ea5483ef1fb907
-rw-r--r--services/powermanager/tests/PowerHalWrapperAidlTest.cpp2
-rw-r--r--services/surfaceflinger/tests/unittests/mock/DisplayHardware/MockIPower.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/services/powermanager/tests/PowerHalWrapperAidlTest.cpp b/services/powermanager/tests/PowerHalWrapperAidlTest.cpp
index 1589c9937d..f5c4fc547c 100644
--- a/services/powermanager/tests/PowerHalWrapperAidlTest.cpp
+++ b/services/powermanager/tests/PowerHalWrapperAidlTest.cpp
@@ -35,6 +35,7 @@ using aidl::android::hardware::power::IPowerHintSession;
using aidl::android::hardware::power::Mode;
using aidl::android::hardware::power::SessionConfig;
using aidl::android::hardware::power::SessionTag;
+using aidl::android::hardware::power::SupportInfo;
using android::binder::Status;
using namespace android;
@@ -65,6 +66,7 @@ public:
(int32_t tgid, int32_t uid, ChannelConfig* _aidl_return), (override));
MOCK_METHOD(ndk::ScopedAStatus, closeSessionChannel, (int32_t tgid, int32_t uid), (override));
MOCK_METHOD(ndk::ScopedAStatus, getHintSessionPreferredRate, (int64_t * rate), (override));
+ MOCK_METHOD(ndk::ScopedAStatus, getSupportInfo, (SupportInfo * _aidl_return), (override));
MOCK_METHOD(ndk::ScopedAStatus, getInterfaceVersion, (int32_t * version), (override));
MOCK_METHOD(ndk::ScopedAStatus, getInterfaceHash, (std::string * hash), (override));
MOCK_METHOD(ndk::SpAIBinder, asBinder, (), (override));
diff --git a/services/surfaceflinger/tests/unittests/mock/DisplayHardware/MockIPower.h b/services/surfaceflinger/tests/unittests/mock/DisplayHardware/MockIPower.h
index ed1405b058..4c034d7012 100644
--- a/services/surfaceflinger/tests/unittests/mock/DisplayHardware/MockIPower.h
+++ b/services/surfaceflinger/tests/unittests/mock/DisplayHardware/MockIPower.h
@@ -32,6 +32,7 @@ using aidl::android::hardware::power::IPower;
using aidl::android::hardware::power::IPowerHintSession;
using aidl::android::hardware::power::SessionConfig;
using aidl::android::hardware::power::SessionTag;
+using aidl::android::hardware::power::SupportInfo;
using aidl::android::hardware::power::Mode;
using android::binder::Status;
@@ -59,6 +60,7 @@ public:
MOCK_METHOD(ndk::ScopedAStatus, getSessionChannel,
(int32_t tgid, int32_t uid, ChannelConfig* _aidl_return), (override));
MOCK_METHOD(ndk::ScopedAStatus, closeSessionChannel, (int32_t tgid, int32_t uid), (override));
+ MOCK_METHOD(ndk::ScopedAStatus, getSupportInfo, (SupportInfo * _aidl_return), (override));
MOCK_METHOD(ndk::ScopedAStatus, getInterfaceVersion, (int32_t * version), (override));
MOCK_METHOD(ndk::ScopedAStatus, getInterfaceHash, (std::string * hash), (override));
MOCK_METHOD(ndk::SpAIBinder, asBinder, (), (override));