Skip to content

Commit 11b98f2

Browse files
committed
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
1 parent c0bc4ae commit 11b98f2

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

services/powermanager/tests/PowerHalWrapperAidlTest.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ using aidl::android::hardware::power::IPowerHintSession;
3535
using aidl::android::hardware::power::Mode;
3636
using aidl::android::hardware::power::SessionConfig;
3737
using aidl::android::hardware::power::SessionTag;
38+
using aidl::android::hardware::power::SupportInfo;
3839
using android::binder::Status;
3940

4041
using namespace android;
@@ -65,6 +66,7 @@ class MockIPower : public IPower {
6566
(int32_t tgid, int32_t uid, ChannelConfig* _aidl_return), (override));
6667
MOCK_METHOD(ndk::ScopedAStatus, closeSessionChannel, (int32_t tgid, int32_t uid), (override));
6768
MOCK_METHOD(ndk::ScopedAStatus, getHintSessionPreferredRate, (int64_t * rate), (override));
69+
MOCK_METHOD(ndk::ScopedAStatus, getSupportInfo, (SupportInfo * _aidl_return), (override));
6870
MOCK_METHOD(ndk::ScopedAStatus, getInterfaceVersion, (int32_t * version), (override));
6971
MOCK_METHOD(ndk::ScopedAStatus, getInterfaceHash, (std::string * hash), (override));
7072
MOCK_METHOD(ndk::SpAIBinder, asBinder, (), (override));

services/surfaceflinger/tests/unittests/mock/DisplayHardware/MockIPower.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ using aidl::android::hardware::power::IPower;
3232
using aidl::android::hardware::power::IPowerHintSession;
3333
using aidl::android::hardware::power::SessionConfig;
3434
using aidl::android::hardware::power::SessionTag;
35+
using aidl::android::hardware::power::SupportInfo;
3536

3637
using aidl::android::hardware::power::Mode;
3738
using android::binder::Status;
@@ -59,6 +60,7 @@ class MockIPower : public IPower {
5960
MOCK_METHOD(ndk::ScopedAStatus, getSessionChannel,
6061
(int32_t tgid, int32_t uid, ChannelConfig* _aidl_return), (override));
6162
MOCK_METHOD(ndk::ScopedAStatus, closeSessionChannel, (int32_t tgid, int32_t uid), (override));
63+
MOCK_METHOD(ndk::ScopedAStatus, getSupportInfo, (SupportInfo * _aidl_return), (override));
6264
MOCK_METHOD(ndk::ScopedAStatus, getInterfaceVersion, (int32_t * version), (override));
6365
MOCK_METHOD(ndk::ScopedAStatus, getInterfaceHash, (std::string * hash), (override));
6466
MOCK_METHOD(ndk::SpAIBinder, asBinder, (), (override));

0 commit comments

Comments
 (0)