power-libperfmgr: add an updateHint function for simple hint ops

Change-Id: I2e64f23b5435f7262b36acd52916b5ac795dd106
This commit is contained in:
Jesse Chan 2020-06-30 21:13:53 +08:00 committed by Andreas Schneider
parent 7fad4a5d2c
commit 6e68f025eb
2 changed files with 14 additions and 0 deletions

View File

@ -103,6 +103,18 @@ Power::Power()
mInitThread.detach();
}
Return<void> 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<void> Power::setInteractive(bool /* interactive */) {
return Void();

View File

@ -76,6 +76,8 @@ class Power : public IPower {
std::atomic<bool> mCameraStreamingMode;
std::atomic<bool> mReady;
std::thread mInitThread;
Return<void> updateHint(const char *hint, bool enable);
};
} // namespace implementation