diff --git a/hidl/power-libperfmgr/Power.cpp b/hidl/power-libperfmgr/Power.cpp index 4c29c264..5cb938f8 100644 --- a/hidl/power-libperfmgr/Power.cpp +++ b/hidl/power-libperfmgr/Power.cpp @@ -103,6 +103,18 @@ Power::Power() mInitThread.detach(); } +Return Power::updateHint(const char *hint, bool enable) { + if (!mReady) { + return Void(); + } + if (enable) { + mHintManager->DoHint(hint); + } else { + mHintManager->EndHint(hint); + } + return Void(); +} + // Methods from ::android::hardware::power::V1_0::IPower follow. Return Power::setInteractive(bool /* interactive */) { return Void(); diff --git a/hidl/power-libperfmgr/Power.h b/hidl/power-libperfmgr/Power.h index 1acabdb7..8922dfff 100644 --- a/hidl/power-libperfmgr/Power.h +++ b/hidl/power-libperfmgr/Power.h @@ -76,6 +76,8 @@ class Power : public IPower { std::atomic mCameraStreamingMode; std::atomic mReady; std::thread mInitThread; + + Return updateHint(const char *hint, bool enable); }; } // namespace implementation