sm6375-common: power-libperfmgr: Hook with display handler
Bug: 147840817 Test: boot and check power hint Change-Id: I9c0c98e76ef4b5f4756f63ed5122efc366737869
This commit is contained in:
parent
1c6d7e3c10
commit
07e98fde3f
1 changed files with 12 additions and 0 deletions
|
@ -195,13 +195,25 @@ ndk::ScopedAStatus Power::setBoost(Boost type, int32_t durationMs) {
|
||||||
ATRACE_INT(toString(type).c_str(), durationMs);
|
ATRACE_INT(toString(type).c_str(), durationMs);
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Boost::INTERACTION:
|
case Boost::INTERACTION:
|
||||||
|
if (mVRModeOn || mSustainedPerfModeOn) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
mInteractionHandler->Acquire(durationMs);
|
||||||
|
break;
|
||||||
case Boost::DISPLAY_UPDATE_IMMINENT:
|
case Boost::DISPLAY_UPDATE_IMMINENT:
|
||||||
|
[[fallthrough]];
|
||||||
case Boost::ML_ACC:
|
case Boost::ML_ACC:
|
||||||
|
[[fallthrough]];
|
||||||
case Boost::AUDIO_LAUNCH:
|
case Boost::AUDIO_LAUNCH:
|
||||||
|
[[fallthrough]];
|
||||||
case Boost::CAMERA_LAUNCH:
|
case Boost::CAMERA_LAUNCH:
|
||||||
|
[[fallthrough]];
|
||||||
case Boost::CAMERA_SHOT:
|
case Boost::CAMERA_SHOT:
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
default:
|
default:
|
||||||
|
if (mVRModeOn || mSustainedPerfModeOn) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (durationMs > 0) {
|
if (durationMs > 0) {
|
||||||
mHintManager->DoHint(toString(type), std::chrono::milliseconds(durationMs));
|
mHintManager->DoHint(toString(type), std::chrono::milliseconds(durationMs));
|
||||||
} else if (durationMs == 0) {
|
} else if (durationMs == 0) {
|
||||||
|
|
Loading…
Reference in a new issue