sm6375-common: power-libperfmgr: ADPF: Fix updateHintBoost blocks the binder thread
post the task into a looper thread. Bug: 232992641 Test: Manually playing UIBench -> Transitions -> ActivityTransition Change-Id: Ibd241834f904b4c87a51363e766e110d2818d496
This commit is contained in:
parent
620a6da869
commit
fbcc05b19b
6 changed files with 43 additions and 16 deletions
|
|
@ -47,7 +47,10 @@ ndk::ScopedAStatus PowerExt::setMode(const std::string &mode, bool enabled) {
|
|||
} else {
|
||||
HintManager::GetInstance()->EndHint(mode);
|
||||
}
|
||||
PowerSessionManager::getInstance()->updateHintMode(mode, enabled);
|
||||
if (HintManager::GetInstance()->GetAdpfProfile() &&
|
||||
HintManager::GetInstance()->GetAdpfProfile()->mReportingRateLimitNs > 0) {
|
||||
PowerSessionManager::getInstance()->updateHintMode(mode, enabled);
|
||||
}
|
||||
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
|
@ -61,7 +64,10 @@ ndk::ScopedAStatus PowerExt::isModeSupported(const std::string &mode, bool *_aid
|
|||
|
||||
ndk::ScopedAStatus PowerExt::setBoost(const std::string &boost, int32_t durationMs) {
|
||||
LOG(DEBUG) << "PowerExt setBoost: " << boost << " duration: " << durationMs;
|
||||
PowerSessionManager::getInstance()->updateHintBoost(boost, durationMs);
|
||||
if (HintManager::GetInstance()->GetAdpfProfile() &&
|
||||
HintManager::GetInstance()->GetAdpfProfile()->mReportingRateLimitNs > 0) {
|
||||
PowerSessionManager::getInstance()->updateHintBoost(boost, durationMs);
|
||||
}
|
||||
|
||||
if (durationMs > 0) {
|
||||
HintManager::GetInstance()->DoHint(boost, std::chrono::milliseconds(durationMs));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue