Loading services/surfaceflinger/Scheduler/RefreshRateSelector.cpp +8 −7 Original line number Diff line number Diff line Loading @@ -1395,14 +1395,15 @@ auto RefreshRateSelector::setPolicy(const PolicyVariant& policy) -> SetPolicyRes const auto& idleScreenConfigOpt = getCurrentPolicyLocked()->idleScreenConfigOpt; if (idleScreenConfigOpt != oldPolicy.idleScreenConfigOpt) { if (!idleScreenConfigOpt.has_value()) { if (mIdleTimer) { // fallback to legacy timer if existed, otherwise pause the old timer LOG_ALWAYS_FATAL_IF(!mIdleTimer); if (mConfig.legacyIdleTimerTimeout > 0ms) { mIdleTimer->setInterval(mConfig.legacyIdleTimerTimeout); mIdleTimer->resume(); } else { mIdleTimer->pause(); } } } else if (idleScreenConfigOpt->timeoutMillis > 0) { // create a new timer or reconfigure const auto timeout = std::chrono::milliseconds{idleScreenConfigOpt->timeoutMillis}; Loading Loading
services/surfaceflinger/Scheduler/RefreshRateSelector.cpp +8 −7 Original line number Diff line number Diff line Loading @@ -1395,14 +1395,15 @@ auto RefreshRateSelector::setPolicy(const PolicyVariant& policy) -> SetPolicyRes const auto& idleScreenConfigOpt = getCurrentPolicyLocked()->idleScreenConfigOpt; if (idleScreenConfigOpt != oldPolicy.idleScreenConfigOpt) { if (!idleScreenConfigOpt.has_value()) { if (mIdleTimer) { // fallback to legacy timer if existed, otherwise pause the old timer LOG_ALWAYS_FATAL_IF(!mIdleTimer); if (mConfig.legacyIdleTimerTimeout > 0ms) { mIdleTimer->setInterval(mConfig.legacyIdleTimerTimeout); mIdleTimer->resume(); } else { mIdleTimer->pause(); } } } else if (idleScreenConfigOpt->timeoutMillis > 0) { // create a new timer or reconfigure const auto timeout = std::chrono::milliseconds{idleScreenConfigOpt->timeoutMillis}; Loading