mirror of
https://github.com/PixelExperience-Devices/device_xiaomi_sm6250-common.git
synced 2025-05-03 20:37:17 +09:00
power-libperfmgr: add an updateHint function for simple hint ops
Change-Id: I2e64f23b5435f7262b36acd52916b5ac795dd106
This commit is contained in:
parent
feee933b2e
commit
dad7775864
@ -92,6 +92,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();
|
||||||
|
@ -73,6 +73,8 @@ class Power : public IPower {
|
|||||||
std::atomic<bool> mSustainedPerfModeOn;
|
std::atomic<bool> mSustainedPerfModeOn;
|
||||||
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…
x
Reference in New Issue
Block a user