[power manager] disable traffic jams when power scheme is switched from Auto to EconomyMaximum.

This commit is contained in:
Arsentiy Milchakov 2019-02-27 11:26:43 +03:00 committed by Aleksey Belousov
parent 5abd9588e6
commit 0944c0a3aa
2 changed files with 7 additions and 0 deletions

View file

@ -3812,6 +3812,12 @@ void Framework::OnPowerFacilityChanged(power_management::Facility const facility
}
}
void Framework::OnPowerSchemeChanged(power_management::Scheme const actualScheme)
{
if (actualScheme == power_management::Scheme::EconomyMaximum && GetTrafficManager().IsEnabled())
GetTrafficManager().SetEnabled(false);
}
TipsApi const & Framework::GetTipsApi() const
{
return m_tipsApi;

View file

@ -920,4 +920,5 @@ public:
// PowerManager::Subscriber override.
void OnPowerFacilityChanged(power_management::Facility const facility, bool enabled) override;
void OnPowerSchemeChanged(power_management::Scheme const actualScheme) override;
};