~aleteoryx/muditaos

4a87df1bcbc7ca36cae5acb6b4209a9dcf1b60b1 — Michał Kamoń 4 years ago 1a2e12a
[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).
1 files changed, 2 insertions(+), 2 deletions(-)

M module-services/service-evtmgr/backlight-handler/BacklightHandler.cpp
M module-services/service-evtmgr/backlight-handler/BacklightHandler.cpp => module-services/service-evtmgr/backlight-handler/BacklightHandler.cpp +2 -2
@@ 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);
            }