Refactor initial support check to use SupportInfo
This change makes the intial support check when
APerformanceHintManager starts pass the SupportInfo
object instead of just relying on the preferred rate
Bug: 367803904
Test: atest PerformanceHintNativeTestCases
Test: atest HintManagerServiceTest
Flag: EXEMPT refactor
Change-Id: Iba93310c58896a2b1d02c6156b4e67eaa766af5b
diff --git a/services/powermanager/PowerHalController.cpp b/services/powermanager/PowerHalController.cpp
index 40fd097..0ba1909 100644
--- a/services/powermanager/PowerHalController.cpp
+++ b/services/powermanager/PowerHalController.cpp
@@ -168,6 +168,11 @@
"closeSessionChannel"));
}
+HalResult<aidl::android::hardware::power::SupportInfo> PowerHalController::getSupportInfo() {
+ std::shared_ptr<HalWrapper> handle = initHal();
+ return CACHE_SUPPORT(6, processHalResult(handle->getSupportInfo(), "getSupportInfo"));
+}
+
} // namespace power
} // namespace android