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

Change-Id: I2e64f23b5435f7262b36acd52916b5ac795dd106
tirimbino
Jesse Chan 4 years ago committed by Andreas Schneider
parent 7fad4a5d2c
commit 6e68f025eb
  1. 12
      hidl/power-libperfmgr/Power.cpp
  2. 2
      hidl/power-libperfmgr/Power.h

@ -103,6 +103,18 @@ Power::Power()
mInitThread.detach(); 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. // Methods from ::android::hardware::power::V1_0::IPower follow.
Return<void> Power::setInteractive(bool /* interactive */) { Return<void> Power::setInteractive(bool /* interactive */) {
return Void(); return Void();

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

Loading…
Cancel
Save