power-libperfmgr: ADPF: support sending power hint

Send a hint only when the system can support the hint.

Bug: 243025173
Test: PtsUiBench & CUJ
Original-Change-Id: If56d0c22f8dd61f5fe27ba79f08f2963269abe41
Change-Id: I2c190ac357aa8c5b5da52e3e1566f4f62c388ba6
diff --git a/power-libperfmgr/aidl/PowerHintSession.cpp b/power-libperfmgr/aidl/PowerHintSession.cpp
index 11529ac..eadc4cf 100644
--- a/power-libperfmgr/aidl/PowerHintSession.cpp
+++ b/power-libperfmgr/aidl/PowerHintSession.cpp
@@ -364,7 +364,7 @@
             ALOGE("Error: hint is invalid");
             return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
     }
-    setCpuLoadChangeHint(toString(hint));
+    tryToSendPowerHint(toString(hint));
     mLastUpdatedTime.store(std::chrono::steady_clock::now());
     if (ATRACE_ENABLED()) {
         mLastHintSent = static_cast<int>(hint);