From 4a87df1bcbc7ca36cae5acb6b4209a9dcf1b60b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kamo=C5=84?= Date: Fri, 11 Jun 2021 09:09:52 +0200 Subject: [PATCH] [EGD-6917] Screen light in automode does not turnoff itself The bug was introduced by EGD-6794. The bug is caused by wrong mode selection in `ScreenLightTimer`'s definition. The current design defines auto-turn-off only for automatic mode (EGD-6655). --- .../service-evtmgr/backlight-handler/BacklightHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module-services/service-evtmgr/backlight-handler/BacklightHandler.cpp b/module-services/service-evtmgr/backlight-handler/BacklightHandler.cpp index 99d094e365ab5f22156abb6a3ef694262735d3fc..3d003985bc615a52524efc7cd5f7ad8cd3f3a727 100644 --- a/module-services/service-evtmgr/backlight-handler/BacklightHandler.cpp +++ b/module-services/service-evtmgr/backlight-handler/BacklightHandler.cpp @@ -28,7 +28,7 @@ namespace backlight screenLightTimer{sys::TimerFactory::createSingleShotTimer( parent, timers::screenLightTimerName, timers::keypadLightTimerTimeout, [this](sys::Timer &t) { if (getScreenLightState() && - getScreenAutoModeState() == screen_light_control::ScreenLightMode::Manual && + getScreenAutoModeState() == screen_light_control::ScreenLightMode::Automatic && screenLightControl->isLightOn()) { screenLightControl->processRequest(screen_light_control::Action::turnOff); } @@ -190,7 +190,7 @@ namespace backlight void Handler::handleScreenLightRefresh() { - if (getScreenLightState() && getScreenAutoModeState() == screen_light_control::ScreenLightMode::Manual) { + if (getScreenLightState() && getScreenAutoModeState() == screen_light_control::ScreenLightMode::Automatic) { if (!screenLightControl->isLightOn()) { screenLightControl->processRequest(screen_light_control::Action::turnOn); }