~aleteoryx/muditaos

d9a1194e6f203247ebcef4b03f8ce5ebccc7c778 — Lukasz Mastalerz 2 years ago a21736e
[BH-1688] Create a standard for logs

* Adding document describing how to use logger
* Adjusting logs to follow a new guide
* Change order in log header:
  line number is now before function name
157 files changed, 506 insertions(+), 463 deletions(-)

A doc/logging_guide.md
M module-apps/application-alarm-clock/models/AlarmsRepository.cpp
M module-apps/application-alarm-clock/widgets/AlarmMusicOptionsItem.cpp
M module-apps/application-alarm-clock/widgets/AlarmTimeItem.cpp
M module-apps/application-antenna/windows/ScanModesWindow.cpp
M module-apps/application-calendar/widgets/DayLabel.cpp
M module-apps/application-call/model/CallModel.cpp
M module-apps/application-call/windows/EnterNumberWindow.cpp
M module-apps/application-calllog/ApplicationCallLog.cpp
M module-apps/application-messages/ApplicationMessages.cpp
M module-apps/application-messages/models/SMSTemplateModel.cpp
M module-apps/application-messages/models/SMSThreadModel.cpp
M module-apps/application-messages/models/ThreadsModel.cpp
M module-apps/application-messages/widgets/SMSOutputWidget.cpp
M module-apps/application-messages/windows/MessagesMainWindow.cpp
M module-apps/application-messages/windows/NewMessage.cpp
M module-apps/application-messages/windows/SMSThreadViewWindow.cpp
M module-apps/application-music-player/ApplicationMusicPlayer.cpp
M module-apps/application-music-player/windows/MusicPlayerMainWindow.cpp
M module-apps/application-phonebook/windows/PhonebookContactDetails.cpp
M module-apps/application-phonebook/windows/PhonebookContactOptions.cpp
M module-apps/application-phonebook/windows/PhonebookMainWindow.cpp
M module-apps/application-phonebook/windows/PhonebookNamecardOptions.cpp
M module-apps/application-phonebook/windows/PhonebookNewContact.cpp
M module-apps/application-settings/ApplicationSettings.cpp
M module-apps/application-settings/models/bluetooth/BluetoothSettingsModel.cpp
M module-apps/application-settings/windows/SettingsMainWindow.cpp
M module-apps/application-settings/windows/advanced/AdvancedOptionsWindow.cpp
M module-apps/application-settings/windows/apps/AlarmClockWindow.cpp
M module-apps/application-settings/windows/apps/AppsWindow.cpp
M module-apps/application-settings/windows/apps/MessagesWindow.cpp
M module-apps/application-settings/windows/apps/SoundSelectWindow.cpp
M module-apps/application-settings/windows/display-keypad/DisplayAndKeypadWindow.cpp
M module-apps/application-settings/windows/network/NetworkWindow.cpp
M module-apps/application-settings/windows/system/DateAndTimeMainWindow.cpp
M module-apps/application-settings/windows/system/SystemMainWindow.cpp
M module-apps/application-special-input/widgets/SpecialInputTableWidget.cpp
M module-apps/application-test/ApplicationTest.cpp
M module-apps/application-test/windows/TestPopup.cpp
M module-apps/apps-common/ApplicationCommon.cpp
M module-apps/apps-common/ApplicationCommonPopupBlueprints.cpp
M module-apps/apps-common/AsyncTask.cpp
M module-apps/apps-common/locks/handlers/SimLockHandler.cpp
M module-apps/apps-common/notifications/NotificationsModel.cpp
M module-apps/apps-common/options/type/OptionContact.cpp
M module-apps/apps-common/popups/lock-popups/SimSwitchingWindow.cpp
M module-apps/apps-common/popups/presenter/AlarmPresenter.cpp
M module-apps/apps-common/widgets/ButtonTriState.cpp
M module-apps/apps-common/widgets/TimeWidget.cpp
M module-apps/apps-common/windows/AppWindow.cpp
M module-audio/Audio/Profiles/ProfileConfigUtils.cpp
M module-bluetooth/Bluetooth/BluetoothWorker.cpp
M module-bluetooth/Bluetooth/BtKeysStorage.cpp
M module-bluetooth/Bluetooth/glucode/BluetoothRunLoop.cpp
M module-bluetooth/Bluetooth/glucode/btstack_uart_block_rt1051.cpp
M module-bluetooth/Bluetooth/interface/BluetoothDriverImpl.cpp
M module-bluetooth/Bluetooth/interface/profiles/A2DP/A2DP.cpp
M module-bluetooth/Bluetooth/interface/profiles/SCO/SCO.cpp
M module-bsp/board/linux/usb_cdc/usb_cdc.cpp
M module-bsp/board/linux/vibrator/vibrator.cpp
M module-bsp/board/linux/watchdog/software_watchdog.cpp
M module-cellular/at/src/ATFactory.cpp
M module-cellular/at/src/UrcCusd.cpp
M module-cellular/at/src/UrcQind.cpp
M module-cellular/modem/ATCommon.cpp
M module-cellular/modem/ATParser.cpp
M module-cellular/modem/ATStream.cpp
M module-cellular/modem/mux/CellularMux.cpp
M module-cellular/modem/mux/DLCChannel.cpp
M module-db/Common/Query.cpp
M module-db/Database/Database.cpp
M module-db/Interface/SMSRecord.cpp
M module-db/Interface/ThreadRecord.cpp
M module-db/Tables/ContactsTable.cpp
M module-gui/gui/core/DrawCommand.cpp
M module-gui/gui/core/FontManager.cpp
M module-gui/gui/core/ImageManager.cpp
M module-gui/gui/core/RawFont.cpp
M module-gui/gui/input/Profile.cpp
M module-gui/gui/widgets/status-bar/SignalStrengthBar.cpp
M module-gui/gui/widgets/text/core/cursors/TextBlockCursor.cpp
M module-gui/gui/widgets/text/modes/InputMode.cpp
M module-gui/gui/widgets/text/parsers/RichTextParser.cpp
M module-services/service-antenna/ServiceAntenna.cpp
M module-services/service-audio/AudioServiceAPI.cpp
M module-services/service-audio/ServiceAudio.cpp
M module-services/service-bluetooth/ServiceBluetooth.cpp
M module-services/service-bluetooth/service-bluetooth/BluetoothDevicesModel.cpp
M module-services/service-bluetooth/service-bluetooth/SettingsHolder.cpp
M module-services/service-cellular/CellularServiceAPI.cpp
M module-services/service-cellular/CellularUrcHandler.cpp
M module-services/service-cellular/PacketData.cpp
M module-services/service-cellular/ServiceCellular.cpp
M module-services/service-cellular/call/CellularCall.cpp
M module-services/service-cellular/call/api/ModemCallApi.cpp
M module-services/service-cellular/checkSmsCenter.cpp
M module-services/service-cellular/src/SimCard.cpp
M module-services/service-cellular/src/VolteHandler.hpp
M module-services/service-cellular/src/VolteHandlerImpl.cpp
M module-services/service-cellular/src/ussd/USSDHandler.cpp
M module-services/service-cellular/src/volte/VolteCapabilityHandler.cpp
M module-services/service-cellular/src/volte/VolteCapabilityHandlerCellular.cpp
M module-services/service-db/ServiceDBCommon.cpp
M module-services/service-db/agents/quotes/QuotesAgent.cpp
M module-services/service-db/agents/quotes/RandomizedQuoteModel.cpp
M module-services/service-db/agents/settings/SettingsAgent.cpp
M module-services/service-desktop/ServiceDesktop.cpp
M module-services/service-desktop/Sync.cpp
M module-services/service-desktop/WorkerDesktop.cpp
M module-services/service-desktop/endpoints/Endpoint.cpp
M module-services/service-desktop/endpoints/bluetooth/BluetoothHelper.cpp
M module-services/service-desktop/endpoints/developerMode/DeveloperModeHelper.cpp
M module-services/service-desktop/endpoints/developerMode/Mode/UI_Helper.cpp
M module-services/service-desktop/endpoints/deviceInfo/DeviceInfoEndpointCommon.cpp
M module-services/service-desktop/endpoints/filesystem/FS_Helper.cpp
M module-services/service-desktop/endpoints/filesystem/FileContext.cpp
M module-services/service-desktop/endpoints/filesystem/FileOperations.cpp
M module-services/service-desktop/endpoints/update/UpdateHelper.cpp
M module-services/service-desktop/parser/MessageHandler.cpp
M module-services/service-desktop/parser/ParserFSM.cpp
M module-services/service-eink/ServiceEink.cpp
M module-services/service-fileindexer/InotifyHandler.cpp
M module-services/service-fileindexer/ServiceFileIndexer.cpp
M module-services/service-fileindexer/StartupIndexer.cpp
M module-services/service-fileindexer/include/service-fileindexer/InotifyHandler.hpp
M module-services/service-gui/ServiceGUI.cpp
M module-services/service-test/ServiceTest.cpp
M module-services/service-time/AlarmHandlerFactory.cpp
M module-services/service-time/ServiceTime.cpp
M module-sys/Service/Service.cpp
M module-sys/SystemManager/PowerManager.cpp
M module-sys/SystemManager/SystemManagerCommon.cpp
M module-sys/SystemWatchdog/SystemWatchdog.cpp
M module-utils/log/Logger.cpp
M module-utils/time/time/time_conversion.cpp
M module-utils/time/time/time_date_validation.cpp
M module-utils/unicode/utf8/utf8/UTF8.cpp
M module-utils/utility/Utils.hpp
M module-vfs/drivers/src/thirdparty/fatfs/ff_glue.cpp
M module-vfs/src/purefs/blkdev/disk_handle.cpp
M module-vfs/src/purefs/blkdev/partition_parser.cpp
M products/BellHybrid/BellHybridMain.cpp
M products/BellHybrid/apps/Application.cpp
M products/BellHybrid/apps/application-bell-main/presenters/HomeScreenPresenter.cpp
M products/BellHybrid/apps/application-bell-main/windows/BellMainSetHour.cpp
M products/BellHybrid/apps/common/src/AudioModel.cpp
M products/BellHybrid/services/audio/ServiceAudio.cpp
M products/BellHybrid/services/desktop/endpoints/EndpointFactoryBell.cpp
M products/BellHybrid/services/time/AlarmOperations.cpp
M products/PurePhone/PurePhoneMain.cpp
M products/PurePhone/alarms/src/actions/PlayAudioActions.cpp
M products/PurePhone/services/appmgr/ApplicationManager.cpp
M products/PurePhone/services/db/ServiceDB.cpp
M products/PurePhone/services/desktop/endpoints/EndpointFactoryPure.cpp
M products/PurePhone/services/desktop/endpoints/contacts/ContactHelper.cpp
M products/PurePhone/services/desktop/endpoints/messages/MessageHelper.cpp
M products/PurePhone/services/evtmgr/WorkerEvent.cpp
A doc/logging_guide.md => doc/logging_guide.md +58 -0
@@ 0,0 1,58 @@
MuditaOS Logging Guide
======================

This document describes how and when we should use logs and different levels of logging.
The main goal is to keep our log files as simple as possible, with only the most important data.
Following these rules should make log files shorter, easier to read and give a better understanding of what is happening
in the software.

### Logging principles

- Do not add any information to the log that is already included in the log prefix, such as: parent service name, file,
  line number or function name.
- Do not add additional tags to the log, e.g. \[DB\], \[Desktop\], etc.
- Use magic_enum or other functions to log an enum name instead of logging an int value, unless the underlying value is
  important in the particular case.
- Start logs with a capital letter.
- Logs should be statements that are easy to read and understand out of context.
- Before adding a new log line, think about whether it is important, or whether it might be useful for debugging.
- Try to keep the log message to a single line.

### Log level description

- INFO — This is the default level.
  It should be used to inform about various actions and states that are taking place in software.
  It shows the current state and helps to navigate to understand what the user has done.
  It should be used to log information important from the software point of view.

- DEBUG — This level should be used to log anything that may be important for debugging or locating the error after it
  has occurred.
  Note that our official release builds also have this level available.

- WARNING — This level should be used to log anything that could potentially become an error.

- ERROR — This level should be used to log all errors.

- FATAL — This level should only be used to log fatal errors that could prevent the system from working properly.
  Normally, logging at this level means the end of the program.

- SENSITIVE — This level should be used to log sensitive data.
  This level is behind an additional flag, and we can control whether we want to add these logs to the package or not.
  By default, this level is enabled.

- TRACE — Generally not used in MuditaOS.

- PRINTF — This level is used to log raw information from the system.
  It does not include a log header.
  It should be used rarely and only when really necessary.

### Reminder

If you find a log in the code that does not follow the rules, try to adapt it.
This will help keep our logs in good order and prevent them from rotting.

#### Development and Debugging

When developing new features or debugging, feel free to use log levels without restriction. Also log all data
you may need to find solutions faster.
Before creating a PR, remember to check the logs and make sure they comply with our logging rules. 
\ No newline at end of file

M module-apps/application-alarm-clock/models/AlarmsRepository.cpp => module-apps/application-alarm-clock/models/AlarmsRepository.cpp +0 -2
@@ 23,7 23,6 @@ namespace app::alarmClock
        auto cb      = [callback](auto response) {
            auto result = dynamic_cast<alarms::AlarmsGetInRangeResponseMessage *>(response);
            if (result == nullptr) {
                LOG_ERROR("BAD RESULT");
                return false;
            }
            if (callback) {


@@ 41,7 40,6 @@ namespace app::alarmClock
        auto cb   = [callback](auto response) {
            auto result = dynamic_cast<Result *>(response);
            if (result == nullptr) {
                LOG_ERROR("BAD RESULT");
                return false;
            }
            if (callback) {

M module-apps/application-alarm-clock/widgets/AlarmMusicOptionsItem.cpp => module-apps/application-alarm-clock/widgets/AlarmMusicOptionsItem.cpp +1 -1
@@ 102,7 102,7 @@ namespace gui
                const auto filePath = std::string(musicFolder) + "/" + ent.path().filename().c_str();
                auto fileTags       = tags::fetcher::fetchTags(filePath);
                musicFiles.push_back(fileTags);
                LOG_DEBUG("file: %s found", ent.path().filename().c_str());
                LOG_DEBUG("File '%s' found", ent.path().filename().c_str());
            }
        }
        LOG_INFO("Total number of music files found: %u", static_cast<unsigned int>(musicFiles.size()));

M module-apps/application-alarm-clock/widgets/AlarmTimeItem.cpp => module-apps/application-alarm-clock/widgets/AlarmTimeItem.cpp +2 -2
@@ 97,7 97,7 @@ namespace gui
                    hours = std::stoi(hourInput->getText().c_str());
                }
                catch (const std::exception &e) {
                    LOG_INFO("AlarmTimeItem hours not valid: %s", e.what());
                    LOG_ERROR("Hours not valid: %s", e.what());
                    hours = 0;
                }
                if ((mode24H && hours > utils::time::hoursInday - 1) ||


@@ 110,7 110,7 @@ namespace gui
                    minutes = std::stoi(minuteInput->getText().c_str());
                }
                catch (const std::exception &e) {
                    LOG_INFO("AlarmTimeItem minutes not valid: %s", e.what());
                    LOG_ERROR("Minutes not valid: %s", e.what());
                    minutes = 0;
                }
                if (minutes > utils::time::minutesInHour - 1) {

M module-apps/application-antenna/windows/ScanModesWindow.cpp => module-apps/application-antenna/windows/ScanModesWindow.cpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "ScanModesWindow.hpp"


@@ 64,7 64,7 @@ namespace gui
                    mode = std::to_string(el.first);
                }
                catch (const std::exception &e) {
                    LOG_ERROR("ServiceCellular::std::to_string exception %s", e.what());
                    LOG_ERROR("Parse mode to string exception: %s", e.what());
                }
                auto result = CellularServiceAPI::SetScanMode(this->application, mode);
                if (result) {


@@ 144,7 144,7 @@ namespace gui
            mode = std::stoi(data);
        }
        catch (const std::exception &e) {
            LOG_ERROR("ScanModesWindow::updateCurrentMode exception %s", e.what());
            LOG_ERROR("Update mode failed: %s", e.what());
            return;
        }
        if (mode < modeButtonParams.size()) {

M module-apps/application-calendar/widgets/DayLabel.cpp => module-apps/application-calendar/widgets/DayLabel.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "DayLabel.hpp"


@@ 95,7 95,7 @@ namespace gui
            return result;
        }
        catch (std::exception &e) {
            LOG_ERROR("DayLabel::getDayNumber: %s", e.what());
            LOG_ERROR("Exception: %s", e.what());
            return 0;
        }
    }

M module-apps/application-call/model/CallModel.cpp => module-apps/application-call/model/CallModel.cpp +2 -2
@@ 180,11 180,11 @@ namespace app::call

        auto contact = DBServiceAPI::MatchContactByPhoneNumber(application, phoneNumber.getView());
        if (contact && !contact->isTemporary()) {
            LOG_INFO("number recognized as contact id = %" PRIu32, contact->ID);
            LOG_INFO("Number recognized as contact id = %" PRIu32, contact->ID);
            callerId = contact->getFormattedName();
        }
        else {
            LOG_INFO("number was not recognized as any valid contact");
            LOG_INFO("Number was not recognized as any valid contact");
            callerId = UTF8(phoneNumber.getFormatted());
        }


M module-apps/application-call/windows/EnterNumberWindow.cpp => module-apps/application-call/windows/EnterNumberWindow.cpp +1 -1
@@ 57,7 57,7 @@ namespace gui
    bool EnterNumberWindow::handleSwitchData(SwitchData *data)
    {
        if (data == nullptr) {
            LOG_ERROR("Received null pointer");
            LOG_ERROR("No data received");
            return false;
        }


M module-apps/application-calllog/ApplicationCallLog.cpp => module-apps/application-calllog/ApplicationCallLog.cpp +2 -3
@@ 44,7 44,6 @@ namespace app

    ApplicationCallLog::~ApplicationCallLog()
    {
        LOG_INFO("ApplicationCallLog::destroy");
    }

    // Invoked upon receiving data message


@@ 117,7 116,7 @@ namespace app

    bool ApplicationCallLog::removeCalllogEntry(const CalllogRecord &record)
    {
        LOG_DEBUG("Removing CalllogRecord: %" PRIu32, record.ID);
        LOG_DEBUG("Removing call log record: %" PRIu32, record.ID);
        auto metaData = std::make_unique<gui::DialogMetadataMessage>(
            gui::DialogMetadata{record.name,
                                "delete_128px_W_G",


@@ 125,7 124,7 @@ namespace app
                                "",
                                [=]() -> bool {
                                    if (DBServiceAPI::CalllogRemove(this, record.ID) == false) {
                                        LOG_ERROR("CalllogRemove id=%" PRIu32 " failed", record.ID);
                                        LOG_ERROR("Call log remove id=%" PRIu32 " failed", record.ID);
                                        return false;
                                    }
                                    this->switchWindow(calllog::settings::MainWindowStr);

M module-apps/application-messages/ApplicationMessages.cpp => module-apps/application-messages/ApplicationMessages.cpp +2 -2
@@ 257,7 257,7 @@ namespace app
                switchWindow(gui::name::window::main_window);
                return true;
            }
            LOG_ERROR("ThreadRemove id=%" PRIu32 " failed", threadId);
            LOG_ERROR("Thread remove id=%" PRIu32 " failed", threadId);
            return false;
        });
        task->execute(this, this);


@@ 308,7 308,7 @@ namespace app
                task->execute(this, this);
                return true;
            }
            LOG_ERROR("sSMSRemove id=%" PRIu32 " failed", record.ID);
            LOG_ERROR("SMS remove id=%" PRIu32 " failed", record.ID);
            return false;
        });
        task->execute(this, this);

M module-apps/application-messages/models/SMSTemplateModel.cpp => module-apps/application-messages/models/SMSTemplateModel.cpp +0 -1
@@ 41,7 41,6 @@ gui::ListItem *SMSTemplateModel::getItem(gui::Order order)
    auto item = new gui::SMSTemplateItem();
    item->setTemplate(templ);
    item->activatedCallback = [=](gui::Item &it) {
        LOG_INFO("activatedCallback");
        if (auto app = dynamic_cast<app::ApplicationMessages *>(application)) {
            if (app->templatesCallback) {
                return app->templatesCallback(templ);

M module-apps/application-messages/models/SMSThreadModel.cpp => module-apps/application-messages/models/SMSThreadModel.cpp +1 -1
@@ 108,7 108,7 @@ void SMSThreadModel::addReturnNumber()
        assert(app != nullptr);
        assert(smsInput->number != nullptr);
        if (!app->handleSendSmsFromThread(*smsInput->number, smsInput->inputText->getText())) {
            LOG_ERROR("handleSendSmsFromThread failed");
            LOG_ERROR("Send SMS from thread failed");
        }
        smsInput->clearDraftMessage();
        return true;

M module-apps/application-messages/models/ThreadsModel.cpp => module-apps/application-messages/models/ThreadsModel.cpp +1 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "MessagesStyle.hpp"


@@ 35,7 35,6 @@ auto ThreadsModel::getItem(gui::Order order) -> gui::ListItem *
    auto item = gui::ThreadItem::makeThreadItem(threadStruct);

    item->activatedCallback = [this, threadStruct](gui::Item &item) {
        LOG_INFO("ThreadItem ActivatedCallback");
        if (application) {
            const auto &threadItem = static_cast<gui::ThreadItem &>(item);
            application->switchWindow(

M module-apps/application-messages/widgets/SMSOutputWidget.cpp => module-apps/application-messages/widgets/SMSOutputWidget.cpp +1 -2
@@ 58,7 58,7 @@ namespace gui
            body->addWidget(smsBubble);
            break;
        case SMSType::DRAFT:
            LOG_ERROR("Can't handle Draft type message in smsBubble");
            LOG_ERROR("Can't handle draft type message in smsBubble");
            break;
        default:
            break;


@@ 87,7 87,6 @@ namespace gui

        smsBubble->inputCallback = [application, record](Item &, const InputEvent &event) {
            if (event.isShortRelease(KeyCode::KEY_LF)) {
                LOG_INFO("Message activated!");
                auto app = dynamic_cast<app::ApplicationMessages *>(application);
                assert(app != nullptr);
                app->switchWindow(gui::name::window::sms_options, std::make_unique<SMSSwitchData>(*record));

M module-apps/application-messages/windows/MessagesMainWindow.cpp => module-apps/application-messages/windows/MessagesMainWindow.cpp +1 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "ApplicationMessages.hpp"


@@ 103,7 103,6 @@ namespace gui

    void MessagesMainWindow::onBeforeShow(ShowMode mode, SwitchData *data)
    {
        LOG_INFO("Data: %s", data ? data->getDescription().c_str() : "");
        {
            auto pdata = dynamic_cast<PhonebookSearchRequest *>(data);
            if (pdata != nullptr) {

M module-apps/application-messages/windows/NewMessage.cpp => module-apps/application-messages/windows/NewMessage.cpp +1 -1
@@ 283,7 283,7 @@ namespace gui
                return false;
            }
            if (!sendSms()) {
                LOG_ERROR("sendSms failed");
                LOG_ERROR("Send SMS failed");
            }
            return true;
        };

M module-apps/application-messages/windows/SMSThreadViewWindow.cpp => module-apps/application-messages/windows/SMSThreadViewWindow.cpp +2 -2
@@ 91,7 91,7 @@ namespace gui
        }

        if (const auto pdata = dynamic_cast<SMSThreadData *>(data); pdata != nullptr) {
            LOG_INFO("Thread data received: %" PRIu32, pdata->thread->ID);
            LOG_DEBUG("Thread data received: %" PRIu32, pdata->thread->ID);
            saveInfoAboutPreviousAppForProperSwitchBack(data);

            smsModel->numberID    = pdata->thread->numberID;


@@ 110,7 110,7 @@ namespace gui
        }

        if (const auto pdata = dynamic_cast<SMSTextData *>(data); pdata != nullptr) {
            LOG_INFO("received sms templates data");
            LOG_DEBUG("Received sms templates data");
            if (pdata->concatenate == SMSTextData::Concatenate::True) {
                smsModel->smsInput->inputText->addText(pdata->text);
            }

M module-apps/application-music-player/ApplicationMusicPlayer.cpp => module-apps/application-music-player/ApplicationMusicPlayer.cpp +0 -2
@@ 42,8 42,6 @@ namespace app
              std::move(name), std::move(parent), statusIndicators, startInBackground, applicationMusicPlayerStackSize),
          priv{std::make_unique<music_player::internal::MusicPlayerPriv>()}
    {
        LOG_INFO("ApplicationMusicPlayer creating");

        bus.channels.push_back(sys::BusChannel::ServiceAudioNotifications);

        const auto paths     = std::vector<std::string>{purefs::dir::getUserMediaPath()};

M module-apps/application-music-player/windows/MusicPlayerMainWindow.cpp => module-apps/application-music-player/windows/MusicPlayerMainWindow.cpp +1 -1
@@ 177,7 177,7 @@ namespace gui
                        if (window.empty()) {
                            return true;
                        }
                        LOG_INFO("switching to window %s", window.c_str());
                        LOG_DEBUG("Switching to window %s", window.c_str());
                        application->switchWindow(window, nullptr);
                        return true;
                    },

M module-apps/application-phonebook/windows/PhonebookContactDetails.cpp => module-apps/application-phonebook/windows/PhonebookContactDetails.cpp +1 -1
@@ 74,7 74,7 @@ namespace gui
                contactFlagsWidget->setSpeedDial(true, position);
            }
            catch (std::exception &e) {
                LOG_ERROR("PhonebookContactDetails::onBeforeShow: %s", e.what());
                LOG_ERROR("Exception during setting speed dial: %s", e.what());
                contactFlagsWidget->setSpeedDial(false, 0);
            }
        }

M module-apps/application-phonebook/windows/PhonebookContactOptions.cpp => module-apps/application-phonebook/windows/PhonebookContactOptions.cpp +2 -2
@@ 23,7 23,7 @@ namespace gui
    {
        auto *item = dynamic_cast<PhonebookItemData *>(data);
        if (item == nullptr) {
            LOG_WARN("Received null pointer");
            LOG_WARN("Failed to get phonebook data");
            return false;
        }
        contact     = item->getContact();


@@ 79,7 79,7 @@ namespace gui
                                "",
                                [=]() -> bool {
                                    if (!DBServiceAPI::ContactRemove(this->application, contact->ID)) {
                                        LOG_ERROR("Contact id=%" PRIu32 "  remove failed", contact->ID);
                                        LOG_ERROR("Failed to remove contact (id: %" PRIu32 ")", contact->ID);
                                        return false;
                                    }
                                    showNotification(NotificationType::Delete);

M module-apps/application-phonebook/windows/PhonebookMainWindow.cpp => module-apps/application-phonebook/windows/PhonebookMainWindow.cpp +2 -2
@@ 111,7 111,7 @@ namespace gui
        const auto code = translator.handle(inputEvent.getRawKey(), inputMode ? inputMode->get() : "");
        if (code != Profile::none_key) {
            const auto letter = static_cast<char>(code);
            LOG_INFO("char=' %c'", letter);
            LOG_DEBUG("Filtering by char=' %c'", letter);

            std::string filterLetter;
            filterLetter.push_back(letter);


@@ 119,7 119,7 @@ namespace gui
            LOG_DEBUG("Number of favourites contacts : %" PRIu32, phonebookModel->letterMap.favouritesCount);
            const auto dataOffset = phonebookModel->letterMap.firstLetterDictionary[filterLetter];
            if (dataOffset != phonebookContactsMap::NO_MATCH_FOUND) {
                LOG_DEBUG("PhoneBook Data Offset : %" PRIu32, dataOffset);
                LOG_DEBUG("Phonebook data offset : %" PRIu32, dataOffset);
                phonebookModel->setDisplayMode(static_cast<std::uint32_t>(ContactDisplayMode::SortedByLetter));
                contactsList->rebuildList(gui::listview::RebuildType::OnOffset, dataOffset);
            }

M module-apps/application-phonebook/windows/PhonebookNamecardOptions.cpp => module-apps/application-phonebook/windows/PhonebookNamecardOptions.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <service-appmgr/Controller.hpp>


@@ 20,7 20,7 @@ namespace gui
    {
        auto *item = dynamic_cast<PhonebookItemData *>(data);
        if (item == nullptr) {
            LOG_WARN("Received null pointer");
            LOG_ERROR("Failed to get phonebook data");
            return false;
        }


M module-apps/application-phonebook/windows/PhonebookNewContact.cpp => module-apps/application-phonebook/windows/PhonebookNewContact.cpp +4 -4
@@ 212,7 212,7 @@ namespace gui
        if (contactAction == ContactAction::Add) {
            auto returnedContact = DBServiceAPI::ContactAdd(application, *contact);
            if (!returnedContact.has_value()) {
                LOG_ERROR("verifyAndSave failed to ADD contact");
                LOG_ERROR("Failed to add contact");
                return false;
            }
            *contact = returnedContact.value();


@@ 225,7 225,7 @@ namespace gui
                return false;
            }
            else if (!DBServiceAPI::ContactUpdate(application, *contact)) {
                LOG_ERROR("verifyAndSave failed to UPDATE contact");
                LOG_ERROR("Failed to update contact");
                return false;
            }
        }


@@ 258,7 258,7 @@ namespace gui
                    contact->ID = oldContactRecord.ID;
                }
                if (!DBServiceAPI::ContactUpdate(application, *contact)) {
                    LOG_ERROR("Contact id=%" PRIu32 " update failed", contact->ID);
                    LOG_ERROR("Failed to update contact (id: %" PRIu32 ")", contact->ID);
                    return false;
                }



@@ 303,7 303,7 @@ namespace gui
            contact->speeddial,
            [=]() -> bool {
                if (!DBServiceAPI::ContactUpdate(application, *contact)) {
                    LOG_ERROR("Contact id=%" PRIu32 " update failed", contact->ID);
                    LOG_ERROR("Failed to update contact (id: %" PRIu32 ")", contact->ID);
                    return false;
                }
                application->switchWindow(gui::name::window::main_window);

M module-apps/application-settings/ApplicationSettings.cpp => module-apps/application-settings/ApplicationSettings.cpp +4 -4
@@ 651,26 651,26 @@ namespace app

    void ApplicationSettings::operatorOnChanged(const std::string &value)
    {
        LOG_DEBUG("[ApplicationSettings::operatorOnChanged] value=%s", value.c_str());
        LOG_DEBUG("OperatorOn changed: %s", value.c_str());
        if (!value.empty()) {
            operatorsOn = utils::getNumericValue<bool>(value);
        }
    }
    bool ApplicationSettings::getOperatorsOn() const noexcept
    {
        LOG_DEBUG("[ApplicationSettings::getOperatorsOn] %d", operatorsOn);
        LOG_DEBUG("OperatorOn: %d", operatorsOn);
        return operatorsOn;
    }
    void ApplicationSettings::setOperatorsOn(bool value)
    {
        operatorsOn = value;
        LOG_DEBUG("[ApplicationSettings::setOperatorsOn] to %d", operatorsOn);
        LOG_DEBUG("New OperatorOn: %d", operatorsOn);
        settings->setValue(settings::operators_on, std::to_string(static_cast<int>(value)));
    }

    void ApplicationSettings::setOsUpdateVersion(const std::string &value)
    {
        LOG_DEBUG("[ApplicationSettings::setOsUpdateVersion] to value=%s", value.c_str());
        LOG_DEBUG("New OS version: %s", value.c_str());
        settings->setValue(::settings::SystemProperties::osUpdateVersion, value, ::settings::SettingsScope::Global);
    }


M module-apps/application-settings/models/bluetooth/BluetoothSettingsModel.cpp => module-apps/application-settings/models/bluetooth/BluetoothSettingsModel.cpp +2 -2
@@ 97,7 97,7 @@ auto BluetoothSettingsModel::getActiveDevice() -> std::optional<std::reference_w
        return devices.at(activeDeviceIndex);
    }
    catch (const std::out_of_range &oor) {
        LOG_WARN("NO DEVICE FOUND!");
        LOG_WARN("Device not found!");
        return std::nullopt;
    }
}


@@ 107,7 107,7 @@ auto BluetoothSettingsModel::getSelectedDevice() -> std::optional<std::reference
        return devices.at(selectedDeviceIndex);
    }
    catch (const std::out_of_range &oor) {
        LOG_WARN("NO DEVICE FOUND!");
        LOG_WARN("Device not found!");
        return std::nullopt;
    }
}

M module-apps/application-settings/windows/SettingsMainWindow.cpp => module-apps/application-settings/windows/SettingsMainWindow.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "SettingsMainWindow.hpp"


@@ 18,7 18,7 @@ std::list<gui::Option> mainWindowOptionsNew(app::ApplicationCommon *app)
                                       if (window.empty()) {
                                           return false;
                                       }
                                       LOG_INFO("switching to %s page", window.c_str());
                                       LOG_DEBUG("Switching to %s page", window.c_str());
                                       app->switchWindow(window, nullptr);
                                       return true;
                                   },

M module-apps/application-settings/windows/advanced/AdvancedOptionsWindow.cpp => module-apps/application-settings/windows/advanced/AdvancedOptionsWindow.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "AdvancedOptionsWindow.hpp"


@@ 16,7 16,7 @@ std::list<gui::Option> advancedOptions(app::ApplicationCommon *app)
                                       if (window.empty()) {
                                           return false;
                                       }
                                       LOG_INFO("switching to %s page", window.c_str());
                                       LOG_DEBUG("Switching to %s page", window.c_str());
                                       app->switchWindow(window, nullptr);
                                       return true;
                                   },

M module-apps/application-settings/windows/apps/AlarmClockWindow.cpp => module-apps/application-settings/windows/apps/AlarmClockWindow.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "AlarmClockWindow.hpp"


@@ 65,7 65,7 @@ namespace gui

    void AlarmClockWindow::setVolume(uint8_t vol)
    {
        LOG_INFO("setVolume %d", static_cast<int>(vol));
        LOG_INFO("New volume: %d", vol);
        mAudioModel->setVolume(vol);
    }


M module-apps/application-settings/windows/apps/AppsWindow.cpp => module-apps/application-settings/windows/apps/AppsWindow.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "AppsWindow.hpp"


@@ 24,7 24,7 @@ namespace gui
                                                    if (window.empty()) {
                                                        return false;
                                                    }
                                                    LOG_INFO("switching to %s page", window.c_str());
                                                    LOG_DEBUG("Switching to %s page", window.c_str());
                                                    application->switchWindow(window, nullptr);
                                                    return true;
                                                },

M module-apps/application-settings/windows/apps/MessagesWindow.cpp => module-apps/application-settings/windows/apps/MessagesWindow.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "MessagesWindow.hpp"


@@ 62,7 62,7 @@ namespace gui
    void MessagesWindow::switchShowUnreadFirst()
    {
        mShowUnreadMessagesFirst = !mShowUnreadMessagesFirst;
        LOG_INFO("switchSoundState %d", static_cast<int>(mSoundEnabled));
        LOG_INFO("Switch sound state: %d", static_cast<int>(mSoundEnabled));
        refreshOptionsList();
    }


M module-apps/application-settings/windows/apps/SoundSelectWindow.cpp => module-apps/application-settings/windows/apps/SoundSelectWindow.cpp +1 -1
@@ 52,7 52,7 @@ namespace gui
    {
        const auto info = dynamic_cast<SoundSelectData *>(data);
        if (info == nullptr) {
            LOG_ERROR("Null switch data pointer!");
            LOG_ERROR("Failed to get a sound data!");
            return;
        }


M module-apps/application-settings/windows/display-keypad/DisplayAndKeypadWindow.cpp => module-apps/application-settings/windows/display-keypad/DisplayAndKeypadWindow.cpp +1 -1
@@ 27,7 27,7 @@ namespace gui
                    if (window.empty()) {
                        return false;
                    }
                    LOG_INFO("switching to %s page", window.c_str());
                    LOG_DEBUG("Switching to %s page", window.c_str());
                    application->switchWindow(window, nullptr);
                    return true;
                },

M module-apps/application-settings/windows/network/NetworkWindow.cpp => module-apps/application-settings/windows/network/NetworkWindow.cpp +2 -2
@@ 62,7 62,7 @@ namespace gui
                    settingsApp->sendVolteChangeRequest(false);
                    break;
                default:
                    LOG_INFO("[VoLTE] skip request due to unsettled VoLTE state");
                    LOG_INFO("VoLTE state is unsettled, skipping request");
                    break;
                }



@@ 131,7 131,7 @@ namespace gui
        auto labelText = "<text>" + utils::translate("app_settings_network_voice_over_lte");
        if (!volteState.permitted) {
            if (volteState.enablement == cellular::VolteState::Enablement::On) {
                LOG_ERROR("[VoLTE] still enabled in modem despite not permitted by operator");
                LOG_ERROR("VoLTE still enabled in modem despite not permitted by operator");
            }
            labelText += ": ";
            labelText += utils::translate("app_settings_network_volte_not_available");

M module-apps/application-settings/windows/system/DateAndTimeMainWindow.cpp => module-apps/application-settings/windows/system/DateAndTimeMainWindow.cpp +2 -2
@@ 63,12 63,12 @@ namespace gui

        if (!automaticDateAndTimeIsOn) {
            addOption(utils::translate("app_settings_date_and_time_change_time_zone"), [=](Item &item) {
                LOG_INFO("switching to %s page", window::name::change_time_zone);
                LOG_DEBUG("Switching to %s page", window::name::change_time_zone);
                application->switchWindow(window::name::change_time_zone, nullptr);
                return true;
            });
            addOption(utils::translate("app_settings_date_and_time_change_date_and_time"), [=](Item &item) {
                LOG_INFO("switching to %s page", changeDateAndTimeWindow.c_str());
                LOG_DEBUG("Switching to %s page", changeDateAndTimeWindow.c_str());
                application->switchWindow(changeDateAndTimeWindow, nullptr);
                return true;
            });

M module-apps/application-settings/windows/system/SystemMainWindow.cpp => module-apps/application-settings/windows/system/SystemMainWindow.cpp +2 -2
@@ 23,7 23,7 @@ namespace gui
            optionList.emplace_back(std::make_unique<option::OptionSettings>(
                utils::translate(name),
                [=](Item &item) {
                    LOG_INFO("switching to %s page", window.c_str());
                    LOG_DEBUG("Switching to %s page", window.c_str());
                    application->switchWindow(window, nullptr);
                    return true;
                },


@@ 45,7 45,7 @@ namespace gui
                                                sys::SystemManagerCommon::FactoryReset(application);
                                                return true;
                                            }});
                    LOG_INFO("switching to %s page", window.c_str());
                    LOG_DEBUG("Switching to %s page", window.c_str());
                    application->switchWindow(window, gui::ShowMode::GUI_SHOW_INIT, std::move(metaData));
                    return true;
                },

M module-apps/application-special-input/widgets/SpecialInputTableWidget.cpp => module-apps/application-special-input/widgets/SpecialInputTableWidget.cpp +1 -1
@@ 76,7 76,7 @@ namespace gui

        it->activatedCallback = [=](Item &it) {
            setFocusItem(nullptr);
            LOG_INFO("handled special char for %s", application->getCurrentWindow()->getName().c_str());
            LOG_INFO("Handled special char for %s", application->getCurrentWindow()->getName().c_str());

            auto switchData =
                std::make_unique<gui::SwitchSpecialChar>(gui::SwitchSpecialChar::Type::Response, app->requester, str);

M module-apps/application-test/ApplicationTest.cpp => module-apps/application-test/ApplicationTest.cpp +4 -4
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "application-test/ApplicationTest.hpp"


@@ 15,7 15,7 @@ namespace app
                                     StartInBackground startInBackground)
        : Application(name, parent, statusIndicators, startInBackground)
    {
        LOG_INFO("created!");
        LOG_INFO("Created!");
    }

    ApplicationTest::~ApplicationTest()


@@ 25,14 25,14 @@ namespace app

    sys::ReturnCodes ApplicationTest::InitHandler()
    {
        LOG_INFO("initializing!");
        LOG_INFO("Initializing!");
        // NOTE
        // this is very important! as it:
        // 1. sets state initializing on app
        // 2. initailizes settigns - every app have settings object by default
        const auto ret = Application::InitHandler();
        if (ret != sys::ReturnCodes::Success) {
            LOG_ERROR("init app failure! %d", int(ret));
            LOG_ERROR("Init app failure! %d", int(ret));
            return ret;
        }
        createUserInterface();

M module-apps/application-test/windows/TestPopup.cpp => module-apps/application-test/windows/TestPopup.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "LocalStyle.hpp"


@@ 11,7 11,7 @@ namespace gui

    TestPopupWindow::TestPopupWindow(app::ApplicationCommon *app, const std::string &name) : AppWindow(app, name)
    {
        LOG_INFO("popup build!");
        LOG_INFO("Pop-up build!");
        buildInterface();
    }


M module-apps/apps-common/ApplicationCommon.cpp => module-apps/apps-common/ApplicationCommon.cpp +23 -23
@@ 267,10 267,10 @@ namespace app

        std::string window;
#if DEBUG_APPLICATION_MANAGEMENT == 1
        LOG_INFO("switching [%s] to window: %s data description: %s",
                 GetName().c_str(),
                 windowName.length() ? windowName.c_str() : default_window.c_str(),
                 data ? data->getDescription().c_str() : "");
        LOG_DEBUG("Switching [%s] to window: %s data description: %s",
                  GetName().c_str(),
                  windowName.length() ? windowName.c_str() : default_window.c_str(),
                  data ? data->getDescription().c_str() : "");
#endif

        // case to handle returning to previous application


@@ 434,7 434,7 @@ namespace app
    sys::MessagePointer ApplicationCommon::handleKBDKeyEvent(sys::Message *msgl)
    {
        if (this->getState() != app::ApplicationCommon::State::ACTIVE_FORGROUND) {
            LOG_FATAL("!!! Terrible terrible damage! application with no focus grabbed key!");
            LOG_FATAL("Terrible terrible damage! Application with no focus grabbed key!");
        }
        const auto msg        = static_cast<sevm::KbdMessage *>(msgl);
        const auto inputEvent = keyTranslator->translate(msg->key);


@@ 489,7 489,7 @@ namespace app
            auto result = actionHandler(std::move(data));

            if (getState() == State::ACTIVE_FORGROUND && windowsStack().isEmpty()) {
                LOG_ERROR("OnAction application switch with no window provided. Fallback to default mainWindow.");
                LOG_ERROR("Application switch with no window provided. Fallback to default mainWindow.");
                pushWindow(default_window);
            }



@@ 518,8 518,8 @@ namespace app
    sys::MessagePointer ApplicationCommon::handleApplicationSwitchLaunch(sys::Message *msgl)
    {
        const auto msg = static_cast<AppSwitchMessage *>(msgl);
        bool handled = false;
        LOG_DEBUG("AppSwitch: %s", msg->getTargetApplicationName().c_str());
        bool handled   = false;
        LOG_DEBUG("Application switch: %s", msg->getTargetApplicationName().c_str());
        // Application is starting or it is in the background. Upon switch command if name is correct it goes
        // foreground
        if ((state == State::ACTIVATING) || (state == State::INITIALIZING) || (state == State::ACTIVE_BACKGROUND)) {


@@ 527,9 527,9 @@ namespace app
            if (msg->getTargetApplicationName() == this->GetName()) {
                setState(State::ACTIVE_FORGROUND);
                if (app::manager::Controller::confirmSwitch(this)) {
                    LOG_INFO("target Window: %s : target description: %s",
                             msg->getTargetWindowName().c_str(),
                             msg->getData() ? msg->getData()->getDescription().c_str() : "");
                    LOG_DEBUG("Target window: %s : target description: %s",
                              msg->getTargetWindowName().c_str(),
                              msg->getData() ? msg->getData()->getDescription().c_str() : "");
                    switchWindow(msg->getTargetWindowName(), std::move(msg->getData()));
                    handled = true;
                }


@@ 650,7 650,7 @@ namespace app
            refreshWindow(msg->getRefreshMode());
        }
        else {
            LOG_ERROR("cant update window: %s in app: %s, params: haveBuilder: %s is_on_top: %s",
            LOG_ERROR("Can't update window: '%s' in app: '%s', params: haveBuilder: %s is_on_top: %s",
                      msg->getWindowName().c_str(),
                      GetName().c_str(),
                      haveBuilder ? "yes" : "no",


@@ 681,7 681,7 @@ namespace app
    void ApplicationCommon::checkBlockingRequests()
    {
        if (getState() == State::FINALIZING_CLOSE && !callbackStorage->checkBlockingCloseRequests()) {
            LOG_INFO("Blocking requests done for [%s]. Closing application.", GetName().c_str());
            LOG_INFO("Blocking requests done for '%s'. Closing application.", GetName().c_str());
            setState(State::DEACTIVATING);
            app::manager::Controller::confirmClose(this);
        }


@@ 721,7 721,7 @@ namespace app
        }
        const auto window = getCurrentWindow();
        if (window == nullptr) {
            LOG_ERROR("No window - can't dump DOM");
            LOG_ERROR("Failed to get current window");
            return sys::msgNotHandled();
        }



@@ 767,7 767,7 @@ namespace app
    {
        settings->deinit();
        LOG_INFO("Closing an application: %s", GetName().c_str());
        LOG_INFO("Deleting windows");
        LOG_DEBUG("Deleting windows");
        windowsStack().clear();
        return sys::ReturnCodes::Success;
    }


@@ 856,16 856,16 @@ namespace app

        const auto topOfWindowsStackId = windowsStack().getWindowData(app::topWindow)->disposition.id;
        if (data->ignoreIfTheSamePopupIsOnTopOfTheStack && id == topOfWindowsStackId) {
            LOG_WARN("ignoring popup because the same is already on the top of the stack");
            LOG_WARN("Ignoring popup because the same is already on the top of the stack");
            return;
        }

        if (!blueprint) {
            LOG_ERROR("no blueprint to handle %s popup - fallback", std::string(magic_enum::enum_name(id)).c_str());
            LOG_ERROR("No blueprint to handle %s popup - fallback", std::string(magic_enum::enum_name(id)).c_str());
            blueprint = popupBlueprintFallback(id);
        }
        if (data->getDisposition().windowtype != gui::popup::Disposition::WindowType::Popup) {
            LOG_ERROR("setting popup window type from %s to popup - fallback",
            LOG_ERROR("Setting popup window type from %s to popup - fallback",
                      magic_enum::enum_name(data->getDisposition().windowtype).data());
            data->setDisposition(gui::popup::Disposition{
                gui::popup::Disposition::Priority::Normal, gui::popup::Disposition::WindowType::Popup, id});


@@ 907,7 907,7 @@ namespace app
        }

        auto const popup = magic_enum::enum_name(id).data();
        LOG_DEBUG("handling popup: %s", popup);
        LOG_DEBUG("Handling popup: %s", popup);
        /// request handle actually switches window to popup window
        auto retval = request->handle();
        if (!retval) {


@@ 943,9 943,9 @@ namespace app
    void ApplicationCommon::requestShutdownWindow(const std::string &windowName)
    {
#if DEBUG_APPLICATION_MANAGEMENT == 1
        LOG_INFO("switching [%s] to shutdown window: %s",
                 GetName().c_str(),
                 windowName.length() ? windowName.c_str() : default_window.c_str());
        LOG_DEBUG("Switching [%s] to shutdown window: %s",
                  GetName().c_str(),
                  windowName.length() ? windowName.c_str() : default_window.c_str());
#endif
        if (!windowsFactory.isRegistered(windowName)) {
            LOG_ERROR("Cannot find window %s windowsFactory in application: %s", windowName.c_str(), GetName().c_str());


@@ 985,7 985,7 @@ namespace app
        // handle if window was already on
        LOG_INFO("App: %s window %s request", GetName().c_str(), newWindow.c_str());
        if (newWindow.empty() && windowsStack().popLastWindow()) {
            LOG_INFO("Empty window request!");
            LOG_WARN("Empty window request!");
            return;
        }
        if (windowsStack().pop(newWindow)) {

M module-apps/apps-common/ApplicationCommonPopupBlueprints.cpp => module-apps/apps-common/ApplicationCommonPopupBlueprints.cpp +1 -1
@@ 92,7 92,7 @@ namespace app
        auto phoneLockBlueprint = [&](gui::popup::ID id, std::unique_ptr<gui::PopupRequestParams> &params) {
            auto popupParams = dynamic_cast<gui::PhoneUnlockInputRequestParams *>(params.get());
            if (popupParams == nullptr) {
                LOG_ERROR("this is most probably due to wrong unique_ptr handling - please check");
                LOG_ERROR("This is most probably due to wrong unique_ptr handling - please check");
                return false;
            }


M module-apps/apps-common/AsyncTask.cpp => module-apps/apps-common/AsyncTask.cpp +2 -2
@@ 51,7 51,7 @@ namespace app
    {
        const auto [result, id] = DBServiceAPI::GetQuery(application, target, std::move(query));
        if (!result) {
            LOG_FATAL("cant request!");
            LOG_FATAL("Failed to send request!");
        }
        return id;
    }


@@ 71,7 71,7 @@ namespace app
        std::shared_ptr<sys::DataMessage> msg{std::move(message)};
        bool result = application->bus.sendUnicast(msg, serviceName);
        if (!result) {
            LOG_FATAL("cant request!");
            LOG_FATAL("Failed to send message!");
        }
        return msg->uniID;
    }

M module-apps/apps-common/locks/handlers/SimLockHandler.cpp => module-apps/apps-common/locks/handlers/SimLockHandler.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "SimLockHandler.hpp"


@@ 378,7 378,7 @@ namespace locks
        case SimInputTypeAction::Error:
            return handleCMEErrorRequest(storedErrorCode);
        default:
            LOG_WARN("got message of unexpected type: %s", magic_enum::enum_name(simInputTypeAction).data());
            LOG_WARN("Received message of unexpected type: %s", magic_enum::enum_name(simInputTypeAction).data());
            return sys::msgNotHandled();
        }
    }

M module-apps/apps-common/notifications/NotificationsModel.cpp => module-apps/apps-common/notifications/NotificationsModel.cpp +1 -1
@@ 74,7 74,7 @@ void NotificationsModel::updateData(app::manager::actions::NotificationsChangedP
        return;
    }
    if (params == nullptr) {
        LOG_ERROR("params is nullptr");
        LOG_ERROR("Params are not provided");
        return;
    }


M module-apps/apps-common/options/type/OptionContact.cpp => module-apps/apps-common/options/type/OptionContact.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "OptionContact.hpp"


@@ 30,7 30,7 @@ namespace gui::option
            break;
        default:
            text = utils::translate("app_options_invalid_option");
            LOG_WARN("ContactOperation %d not supported", static_cast<int>(contactOperation));
            LOG_WARN("Contact operation %d not supported", static_cast<int>(contactOperation));
            break;
        }


M module-apps/apps-common/popups/lock-popups/SimSwitchingWindow.cpp => module-apps/apps-common/popups/lock-popups/SimSwitchingWindow.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "SimSwitchingWindow.hpp"


@@ 46,7 46,7 @@ namespace gui
                    case Store::GSM::SIM::SIM_FAIL:
                    case Store::GSM::SIM::SIM_UNKNOWN:
                        if (std::chrono::steady_clock::now() - startTime >= constants::maxDurationTime) {
                            LOG_INFO("The SIM switch operation failed. We return to the previous window.");
                            LOG_WARN("The SIM switch operation failed.");
                            application->getSimLockSubject().simSwitched();
                            application->returnToPreviousWindow();
                        }

M module-apps/apps-common/popups/presenter/AlarmPresenter.cpp => module-apps/apps-common/popups/presenter/AlarmPresenter.cpp +2 -2
@@ 138,7 138,7 @@ namespace app::popup
            if (timerHandle.isActive())
                timerHandle.stop();
        }
        LOG_DEBUG("Snoozed!");
        LOG_DEBUG("Alarm snoozed!");
    }

    void AlarmPopupPresenter::stopAlarm()


@@ 152,7 152,7 @@ namespace app::popup
            if (timerHandle.isActive())
                timerHandle.stop();
        }
        LOG_DEBUG("Stopped!");
        LOG_DEBUG("Alarm stopped!");
    }

    void AlarmPopupPresenter::skipToNextSnooze()

M module-apps/apps-common/widgets/ButtonTriState.cpp => module-apps/apps-common/widgets/ButtonTriState.cpp +1 -1
@@ 56,7 56,7 @@ namespace gui
            setText(transitingText);
            break;
        default:
            LOG_ERROR("button state '%s' not implemented - defaulting to OFF",
            LOG_ERROR("Button state '%s' not implemented - defaulting to OFF",
                      magic_enum::enum_name(currentState).data());
            [[fallthrough]];
        case State::Off:

M module-apps/apps-common/widgets/TimeWidget.cpp => module-apps/apps-common/widgets/TimeWidget.cpp +7 -7
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "TimeWidget.hpp"


@@ 94,7 94,7 @@ namespace gui
                        hours = std::stoi(hourInput->getText().c_str());
                    }
                    catch (std::exception &e) {
                        LOG_ERROR("applyInputCallbacks hours: %s", e.what());
                        LOG_ERROR("Exception during getting hours: %s", e.what());
                        return true;
                    }



@@ 218,7 218,7 @@ namespace gui
    {
        if (type == Type::End) {
            if (secondItem == nullptr) {
                LOG_ERROR("secondItem not connected!");
                LOG_ERROR("TimeWidget not connected!");
                return false;
            }
            std::chrono::hours start_hour;


@@ 235,7 235,7 @@ namespace gui
                }
            }
            catch (std::exception &e) {
                LOG_WARN("start_hour: %s", e.what());
                LOG_ERROR("Exception while setting start_hour: %s", e.what());
                return false;
            }



@@ 249,7 249,7 @@ namespace gui
                }
            }
            catch (std::exception &e) {
                LOG_ERROR("end_hour: %s", e.what());
                LOG_ERROR("Exception while setting end_hour: %s", e.what());
                return false;
            }



@@ 257,7 257,7 @@ namespace gui
                start_minutes = std::stoi(secondItem->minuteInput->getText().c_str());
            }
            catch (std::exception &e) {
                LOG_ERROR("start_minutes: %s", e.what());
                LOG_ERROR("Exception while setting start_minutes: %s", e.what());
                return false;
            }



@@ 265,7 265,7 @@ namespace gui
                end_minutes = std::stoi(minuteInput->getText().c_str());
            }
            catch (std::exception &e) {
                LOG_ERROR("end_minutes: %s", e.what());
                LOG_ERROR("Exception while setting end_minutes: %s", e.what());
                return false;
            }


M module-apps/apps-common/windows/AppWindow.cpp => module-apps/apps-common/windows/AppWindow.cpp +1 -1
@@ 180,7 180,7 @@ namespace gui
        }

        if (inputEvent.isLongRelease(gui::KeyCode::KEY_RF)) {
            LOG_INFO("exit to main menu");
            LOG_INFO("Exit to main menu");
            app::manager::Controller::sendAction(application, app::manager::actions::Home);
        }


M module-audio/Audio/Profiles/ProfileConfigUtils.cpp => module-audio/Audio/Profiles/ProfileConfigUtils.cpp +4 -4
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "ProfileConfigUtils.hpp"


@@ 52,7 52,7 @@ namespace audio
        {
            std::ifstream file;
            std::string configString;
            LOG_DEBUG("Reading %s ...", filePath.c_str());
            LOG_DEBUG("Reading profile configuration: %s", filePath.c_str());
            file.open(filePath);
            if (not file.is_open()) {
                LOG_ERROR("Can't open profile configuration file, using defaults!");


@@ 97,7 97,7 @@ namespace audio
            config.playbackPathGain = playbackPathGain;
        }
        else {
            LOG_WARN("playbackPathGain value out of range (%u), using fallback value %u!",
            LOG_WARN("PlaybackPathGain value out of range (%u), using fallback value %u!",
                     playbackPathGain,
                     config.playbackPathGain);
        }


@@ 107,7 107,7 @@ namespace audio
            config.playbackPathAtten = playbackPathAtten;
        }
        else {
            LOG_WARN("playbackPathAtten value out of range (%u), using fallback value %u!",
            LOG_WARN("PlaybackPathAtten value out of range (%u), using fallback value %u!",
                     playbackPathAtten,
                     config.playbackPathAtten);
        }

M module-bluetooth/Bluetooth/BluetoothWorker.cpp => module-bluetooth/Bluetooth/BluetoothWorker.cpp +4 -4
@@ 141,7 141,7 @@ BluetoothWorker::~BluetoothWorker()

auto BluetoothWorker::run() -> bool
{
    LOG_INFO("-> BluetoothWorker run request");
    LOG_INFO("BluetoothWorker run request");
    if (isRunning) {
        return true;
    }


@@ 155,7 155,7 @@ auto BluetoothWorker::run() -> bool

auto BluetoothWorker::handleCommand(QueueHandle_t queue) -> bool
{
    LOG_INFO("handle bluetooth command(s)");
    LOG_INFO("Handle bluetooth command(s)");
    xQueueReceive(queue, nullptr, 0);
    while (not workerQueue->empty()) {
        auto command = workerQueue->peek();


@@ 189,7 189,7 @@ auto BluetoothWorker::handleMessage(uint32_t queueID) -> bool
{
    QueueHandle_t queue = queues[queueID]->GetQueueHandle();
    if (queueID == queueService) {
        LOG_DEBUG("not interested");
        LOG_DEBUG("Ignoring message on 'queueService' queue");
        return true;
    }



@@ 254,7 254,7 @@ auto BluetoothWorker::handleMessage(uint32_t queueID) -> bool
        LOG_ERROR("Uart error [%d]: %s", notification, bluetooth::MessageCstr(notification));
        break;
    default:
        LOG_ERROR("ERROR");
        LOG_ERROR("Unknown message: %d", notification);
    }

    return true;

M module-bluetooth/Bluetooth/BtKeysStorage.cpp => module-bluetooth/Bluetooth/BtKeysStorage.cpp +9 -10
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <algorithm>


@@ 37,17 37,17 @@ namespace bluetooth

    void KeyStorage::openStorage()
    {
        LOG_INFO("opening storage from API");
        LOG_INFO("Opening storage from API");
        std::string keysEntry;
        if (settings) {
            keysEntry = std::visit(bluetooth::StringVisitor(), settings->getValue(bluetooth::Settings::BtKeys));
        }
        else {
            LOG_ERROR("failed opening settings for BT!");
            LOG_ERROR("Failed opening settings for BT!");
            return;
        }
        if (keysEntry.empty()) {
            LOG_WARN("opening empty key entry!");
            LOG_WARN("Opening empty key entry!");
            return;
        }



@@ 63,14 63,14 @@ namespace bluetooth

    void KeyStorage::closeStorage()
    {
        LOG_INFO("closing storage from API");
        LOG_INFO("Closing storage from API");
        writeSettings();
    }
    //

    auto KeyStorage::getLinkKey(uint8_t *bd_addr, link_key_t link_key, link_key_type_t *type) -> int
    {
        if (type != nullptr && bd_addr != nullptr) {
            LOG_INFO("getting key from API");
            LOG_INFO("Getting key from API");

            json11::Json finalJson = json11::Json::object{{strings::keys, keys}};
            auto keysEntryDump     = finalJson.dump();


@@ 114,13 114,12 @@ namespace bluetooth
            settings->onLinkKeyAdded(bd_addr_to_str(bd_addr));
        }
        writeSettings();
        LOG_INFO("keys written to the file");
        LOG_INFO("Keys in file: %d", (int)keys.size());
    }
    void KeyStorage::deleteLinkKey(uint8_t *bd_addr)
    {
        auto keysSize = keys.size();
        LOG_INFO("deleting key from API");
        LOG_INFO("Deleting key from API");
        auto end = std::remove_if(keys.begin(), keys.end(), [&](auto &key) {
            bd_addr_t addr;
            sscanf_bd_addr(key[strings::bd_addr].string_value().c_str(), addr);


@@ 157,7 156,7 @@ namespace bluetooth
            settings->setValue(bluetooth::Settings::BtKeys, keysEntry);
        }
        else {
            LOG_ERROR("failed to open settings to write!");
            LOG_ERROR("Failed to open settings to write!");
            return;
        }
    }

M module-bluetooth/Bluetooth/glucode/BluetoothRunLoop.cpp => module-bluetooth/Bluetooth/glucode/BluetoothRunLoop.cpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "BluetoothRunLoop.hpp"


@@ 38,7 38,7 @@ namespace bluetooth
        // task to handle to optimize 'run on main thread'
        btstack_run_loop_task = xTaskGetCurrentTaskHandle();

        LOG_INFO("run loop init, task %p, queue item size %u",
        LOG_INFO("Run loop init, task %p, queue item size %u",
                 btstack_run_loop_task,
                 static_cast<int>(sizeof(function_call_t)));
    }


@@ 106,7 106,7 @@ namespace bluetooth
            // don't add timer that's already in there
            auto *next = reinterpret_cast<btstack_timer_source_t *>(it->next);
            if (next == ts) {
                LOG_ERROR("btstack_run_loop_timer_add error: timer to add already in list!");
                LOG_ERROR("Timer 'btstack_run_loop_timer' already in list!");
                return;
            }
            // exit if new timeout before list timeout

M module-bluetooth/Bluetooth/glucode/btstack_uart_block_rt1051.cpp => module-bluetooth/Bluetooth/glucode/btstack_uart_block_rt1051.cpp +3 -4
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <bsp/bluetooth/Bluetooth.hpp>


@@ 73,7 73,7 @@ extern "C"
    static void uart_rt1051_receive_block(uint8_t *buffer, uint16_t len)
    {
#ifdef DEBUG_UART
        LOG_INFO("<-- read: %d", len);
        LOG_DEBUG("<-- read: %d", len);
#endif
        BlueKitchen::getInstance()->read(buffer, len);
    }


@@ 81,7 81,7 @@ extern "C"
    static void uart_rt1051_send_block(const uint8_t *buffer, uint16_t length)
    {
#ifdef DEBUG_UART
        LOG_INFO("--> write: %d", length);
        LOG_DEBUG("--> write: %d", length);
#endif
        BlueKitchen::getInstance()->write(buffer, length);
    }


@@ 115,7 115,6 @@ extern "C"

    const btstack_uart_block_t *btstack_uart_block_rt1051_instance()
    {
        LOG_INFO("btstack_uart_block_rt1051_instance");
        return &btstack_uart_posix;
    }
};

M module-bluetooth/Bluetooth/interface/BluetoothDriverImpl.cpp => module-bluetooth/Bluetooth/interface/BluetoothDriverImpl.cpp +8 -6
@@ 128,17 128,19 @@ namespace bluetooth
    }
    void Driver::local_version_information_handler(uint8_t *packet)
    {
        LOG_INFO("Local version information:");
        uint16_t hci_version    = packet[6];
        uint16_t hci_revision   = little_endian_read_16(packet, 7);
        uint16_t lmp_version    = packet[9];
        uint16_t manufacturer   = little_endian_read_16(packet, 10);
        uint16_t lmp_subversion = little_endian_read_16(packet, 12);
        LOG_INFO("- HCI Version    0x%04x", hci_version);
        LOG_INFO("- HCI Revision   0x%04x", hci_revision);
        LOG_INFO("- LMP Version    0x%04x", lmp_version);
        LOG_INFO("- LMP Subversion 0x%04x", lmp_subversion);
        LOG_INFO("- Manufacturer 0x%04x", manufacturer);
        LOG_INFO("Local version information: HCI Version: 0x%04x, HCI Revision: 0x%04x, LMP Version: 0x%04x, LMP "
                 "Subversion: 0x%04x, Manufacturer: 0x%04x",
                 hci_version,
                 hci_revision,
                 lmp_version,
                 lmp_subversion,
                 manufacturer);

        switch (manufacturer) {
        case BLUETOOTH_COMPANY_ID_TEXAS_INSTRUMENTS_INC:
            LOG_INFO("Texas Instruments - CC256x compatible chipset.");

M module-bluetooth/Bluetooth/interface/profiles/A2DP/A2DP.cpp => module-bluetooth/Bluetooth/interface/profiles/A2DP/A2DP.cpp +2 -2
@@ 425,8 425,8 @@ namespace bluetooth
            local_seid = a2dp_subevent_stream_established_get_local_seid(packet);
            cid        = a2dp_subevent_stream_established_get_a2dp_cid(packet);

            LOG_INFO("A2DP_SUBEVENT_STREAM_ESTABLISHED: a2dp_cid [expected 0x%02X, received 0x%02X], local_seid "
                     "[expected 0x%02X, received 0x%02X], remote_seid [expected 0x%02X, received 0x%02X]",
            LOG_INFO("A2DP subevent stream established: a2dp_cid (expected 0x%02X, received 0x%02X), local_seid "
                     "(expected 0x%02X, received 0x%02X), remote_seid (expected 0x%02X, received 0x%02X)",
                     AVRCP::mediaTracker.a2dp_cid,
                     cid,
                     AVRCP::mediaTracker.local_seid,

M module-bluetooth/Bluetooth/interface/profiles/SCO/SCO.cpp => module-bluetooth/Bluetooth/interface/profiles/SCO/SCO.cpp +2 -2
@@ 123,7 123,7 @@ auto SCO::SCOImpl::audioInitialize(int sampleRate) -> Result
    metadata.samplesPerFrame = audioSamplesPerPacket;

    if (sourceQueue == nullptr || sinkQueue == nullptr) {
        LOG_ERROR("failed to create queue!");
        LOG_ERROR("Failed to create queue!");
        return Result(Result::Code::SystemError);
    }



@@ 179,7 179,7 @@ void SCO::SCOImpl::receiveCvsd(uint8_t *packet, uint16_t size)
        xQueueSend(sinkQueue, &audioData, 5);
    }
    else {
        LOG_ERROR("queue is nullptr!");
        LOG_ERROR("Queue is not initialized!");
    }
}


M module-bsp/board/linux/usb_cdc/usb_cdc.cpp => module-bsp/board/linux/usb_cdc/usb_cdc.cpp +4 -4
@@ 170,7 170,7 @@ namespace bsp
        fd = 0;
        fd = open("/dev/ptmx", O_RDWR | O_NOCTTY);
        if (fd == -1) {
            LOG_ERROR("bsp::usbInit Failed to open /dev/ptmx, can't allocate new pseudo terminal");
            LOG_ERROR("Failed to open /dev/ptmx, can't allocate new pseudo terminal");
            return -1;
        }



@@ 179,7 179,7 @@ namespace bsp

        pts_name = ptsname(fd);
        if (pts_name == nullptr) {
            LOG_ERROR("bsp::usbInit ptsname returned NULL, no pseudo terminal allocated");
            LOG_ERROR("ptsname returned NULL, no pseudo terminal allocated");
            return -1;
        }



@@ 187,7 187,7 @@ namespace bsp
        inotify_add_watch(fdNotify, pts_name, IN_OPEN | IN_CLOSE_WRITE);

        writePtsToFile(pts_name);
        LOG_INFO("bsp::usbInit linux ptsname: %s", pts_name);
        LOG_INFO("linux ptsname: %s", pts_name);
        struct termios newtio
        {};
        memset(&newtio, 0, sizeof(newtio));


@@ 219,7 219,7 @@ namespace bsp
                                            &taskHandleReceive);

        if (task_error != pdPASS) {
            LOG_ERROR("bsp::usbInit Failed to start freertos USB_Linux_Receive");
            LOG_ERROR("Failed to start freertos USB_Linux_Receive");
            return -1;
        }


M module-bsp/board/linux/vibrator/vibrator.cpp => module-bsp/board/linux/vibrator/vibrator.cpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "bsp/vibrator/vibrator.hpp"


@@ 11,11 11,11 @@ namespace bsp

        void enable()
        {
            LOG_DEBUG("vibration starts\t\U0001f7e2\U0001f4f3");
            LOG_DEBUG("Vibration starts\t\U0001f7e2\U0001f4f3");
        }
        void disable()
        {
            LOG_DEBUG("vibration ends  \t\U0001f6d1\U0001f4f3");
            LOG_DEBUG("Vibration ends  \t\U0001f6d1\U0001f4f3");
        }
        void init(std::chrono::milliseconds pulse)
        {}

M module-bsp/board/linux/watchdog/software_watchdog.cpp => module-bsp/board/linux/watchdog/software_watchdog.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "software_watchdog.hpp"


@@ 51,7 51,7 @@ namespace bsp::watchdog

            // Critical section not required (atomic 32-bit reads)
            if (lastTimeoutTimestamp - lastRefreshTimestamp >= timeoutPeriod) {
                LOG_FATAL("!!! Software watchdog timeout, exiting !!!");
                LOG_FATAL("Software watchdog timeout, exiting !!!");
                exit(EXIT_FAILURE);
            }
        }

M module-cellular/at/src/ATFactory.cpp => module-cellular/at/src/ATFactory.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "ATFactory.hpp"


@@ 136,7 136,7 @@ namespace at
            assert(g_cmds_map.at(at));
            return *(g_cmds_map.at(at));
        }
        LOG_ERROR("no such at command defined: %d", static_cast<int>(at));
        LOG_ERROR("No such at command defined: %d", static_cast<int>(at));
        assert(g_cmds_map.at(AT::AT));
        return *(g_cmds_map.at(AT::AT));
    }

M module-cellular/at/src/UrcCusd.cpp => module-cellular/at/src/UrcCusd.cpp +2 -2
@@ 32,7 32,7 @@ Cusd::Cusd(const std::string &urcBody, const std::string &urcHead) : Urc(urcBody

        if (auto status = getStatus();
            status != StatusType::FurtherUserActionRequired && status != StatusType::NoFurtherUserActionRequired) {
            LOG_WARN("unsupported CUSD status: %d", magic_enum::enum_integer(status));
            LOG_WARN("Unsupported CUSD status: %d", magic_enum::enum_integer(status));
        }
    }
    catch (std::runtime_error const &exc) {


@@ 109,7 109,7 @@ auto Cusd::split(const std::string &str) -> void
    }

    if (endQuotationMarkPosition == startQuotationMarkPosition + 1) {
        LOG_WARN("empty CUSD message");
        LOG_WARN("Empty CUSD message");
    }
    else {
        auto messageStartPosition = startQuotationMarkPosition + 1;

M module-cellular/at/src/UrcQind.cpp => module-cellular/at/src/UrcQind.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <UrcQind.hpp>


@@ 70,7 70,7 @@ auto Qind::validate(enum CSQ check) const noexcept -> bool
        }
    }
    catch (const std::exception &ex) {
        LOG_FATAL("exception: %s", ex.what());
        LOG_ERROR("Exception: %s", ex.what());
    }
    return false;
}

M module-cellular/modem/ATCommon.cpp => module-cellular/modem/ATCommon.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "ATCommon.hpp"


@@ 86,7 86,7 @@ Result Channel::cmd(const std::string &cmd, std::chrono::milliseconds timeout, s

    cmdInit();
    std::string cmdFixed = formatCommand(cmd);
    LOG_DEBUG("start of %s", cmdFixed.c_str());
    LOG_DEBUG("Start of %s", cmdFixed.c_str());
    cmdSend(cmdFixed);

    auto startTime = std::chrono::steady_clock::now();

M module-cellular/modem/ATParser.cpp => module-cellular/modem/ATParser.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "ATParser.hpp"


@@ 79,7 79,7 @@ at::Result ATParser::processNewData(sys::Service *service, const bsp::cellular::
    }
    else if (!ret.empty()) {
        if (ret.size() == 1 && ret[0] == ATParser::Urc::Fota) {
            LOG_DEBUG("parsing FOTA");
            LOG_DEBUG("Parsing FOTA");
            cpp_freertos::LockGuard lock(mutex);
            urcBuffer.erase();
        }

M module-cellular/modem/ATStream.cpp => module-cellular/modem/ATStream.cpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <cstring>
#include "ATStream.hpp"


@@ 55,7 55,7 @@ namespace at
                Result::Code::ERROR; // setup error but in this case error from +CME ERROR with valid errorCode
            auto tmp_ec = magic_enum::enum_cast<EquipmentErrorCode>(errcode);
            if (tmp_ec.has_value()) {
                LOG_ERROR("%s", utils::enumToString(tmp_ec.value()).c_str());
                LOG_ERROR("CME error: %s", utils::enumToString(tmp_ec.value()).c_str());
                result.errorCode = tmp_ec.value();
            }
            else {


@@ 71,7 71,7 @@ namespace at
            auto atmp_ec = magic_enum::enum_cast<NetworkErrorCode>(errcode);

            if (atmp_ec.has_value()) {
                LOG_ERROR("%s", utils::enumToString(atmp_ec.value()).c_str());
                LOG_ERROR("CMS error code: %s", utils::enumToString(atmp_ec.value()).c_str());
                result.errorCode = atmp_ec.value();
            }
            else {

M module-cellular/modem/mux/CellularMux.cpp => module-cellular/modem/mux/CellularMux.cpp +1 -1
@@ 369,7 369,7 @@ CellularMux::ConfState CellularMux::startMultiplexer()
        auto frameData = data;

        if (frameData.size() < 4) {
            LOG_ERROR("frame too short");
            LOG_ERROR("Frame too short");
            return;
        }
        switch (frameData[0]) {

M module-cellular/modem/mux/DLCChannel.cpp => module-cellular/modem/mux/DLCChannel.cpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "DLCChannel.h"


@@ 35,7 35,7 @@ DLCChannel::DLCChannel(DLCI_t DLCI, const std::string &name, bsp::Cellular *cell
bool DLCChannel::init()
{
    active = establish();
    LOG_INFO("create channel %s: %s", name.c_str(), active ? "TRUE" : "FALSE");
    LOG_INFO("Create channel %s: %s", name.c_str(), active ? "TRUE" : "FALSE");

    return active;
}


@@ 173,7 173,7 @@ at::Result DLCChannel::parseInputData(bsp::cellular::CellularResult *cellularRes
                                (void *)cellularResult->getSerialized().get(),
                                cellularResult->getSerializedSize(),
                                pdMS_TO_TICKS(at::defaultBufferTimeoutMs.count()))) {
            LOG_DEBUG("[DLC] Message buffer full!");
            LOG_DEBUG("DLC message buffer full!");
            result.code = at::Result::Code::FULL_MSG_BUFFER;
        }
    }

M module-db/Common/Query.cpp => module-db/Common/Query.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "Query.hpp"


@@ 40,7 40,7 @@ bool EndpointListener::handleQueryResponse(db::QueryResult *response)
        return ret;
    }

    LOG_ERROR("callback is nullptr!");
    LOG_ERROR("Callback is nullptr!");
    return false;
}


M module-db/Database/Database.cpp => module-db/Database/Database.cpp +6 -6
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "Database.hpp"


@@ 74,7 74,7 @@ Database::Database(const char *name, bool readOnly)
    const int flags = (readOnly) ? (SQLITE_OPEN_READONLY) : (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE);
    LOG_INFO("Opening database: %s", dbName.c_str());
    if (const auto rc = sqlite3_open_v2(name, &dbConnection, flags, nullptr); rc != SQLITE_OK) {
        LOG_ERROR("SQLITE INITIALIZATION ERROR! rc=%d dbName=%s", rc, name);
        LOG_ERROR("SQLITE initialization error! rc=%d dbName=%s", rc, name);
        throw DatabaseInitialisationError{"Failed to initialize the sqlite db"};
    }
    sqlite3_extended_result_codes(dbConnection, enabled);


@@ 207,7 207,7 @@ auto Database::pragmaQueryForValue(const std::string &pragmaStatement, const std
    auto results = query(pragmaStatement.c_str());

    if (!results || results->getRowCount() == 0) {
        LOG_DEBUG("no results!");
        LOG_DEBUG("No results!");
        return false;
    }



@@ 238,7 238,7 @@ void Database::pragmaQuery(const std::string &pragmaStatement)
        } while (results->nextRow());
    }
    else {
        LOG_DEBUG("no results!");
        LOG_DEBUG("No results!");
    }
}



@@ 249,11 249,11 @@ bool Database::storeIntoFile(const std::filesystem::path &syncPath)
    // that's why we need to commit it manually
    if (sqlite3_get_autocommit(dbConnection) == 0) {
        if (const auto rc = execute("COMMIT;"); !rc) {
            LOG_ERROR("failed to execute commit; sqlite3 autocommit after commit: %d",
            LOG_ERROR("Failed to execute commit; sqlite3 autocommit after commit: %d",
                      sqlite3_get_autocommit(dbConnection));
            return false;
        }
        LOG_INFO("sqlite3 autocommit after commit: %d", sqlite3_get_autocommit(dbConnection));
        LOG_INFO("SQLITE3 autocommit after commit: %d", sqlite3_get_autocommit(dbConnection));
    }

    LOG_INFO("Store database: %s, into file: %s - STARTED", dbName.c_str(), syncPath.c_str());

M module-db/Interface/SMSRecord.cpp => module-db/Interface/SMSRecord.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "SMSRecord.hpp"


@@ 81,7 81,7 @@ bool SMSRecordInterface::Add(const SMSRecord &rec)
    thread.msgCount++;
    if (rec.type == SMSType::INBOX) {
        thread.unreadMsgCount++;
        LOG_DEBUG("unreadMsgCount = %" PRIu32 " for thread = %" PRIu32, thread.unreadMsgCount, thread.ID);
        LOG_DEBUG("Unread messages = %" PRIu32 " for thread = %" PRIu32, thread.unreadMsgCount, thread.ID);
    }

    if (!threadInterface.Update(thread)) {

M module-db/Interface/ThreadRecord.cpp => module-db/Interface/ThreadRecord.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "ThreadRecord.hpp"


@@ 196,7 196,7 @@ std::unique_ptr<db::QueryResult> ThreadRecordInterface::markAsReadQuery(const st
    auto result           = false;

    if (record.isValid()) {
        LOG_DEBUG("query-read %d", static_cast<int>(localQuery->read));
        LOG_DEBUG("Query read: %d", static_cast<int>(localQuery->read));
        record.unreadMsgCount = localQuery->read == db::query::MarkAsRead::Read::True ? 0 : 1;
        result                = Update(record);
    }

M module-db/Tables/ContactsTable.cpp => module-db/Tables/ContactsTable.cpp +1 -1
@@ 89,7 89,7 @@ ContactsTableRow ContactsTable::getByIdCommon(std::unique_ptr<QueryResult> retQu
{
    debug_db_data("%s", __FUNCTION__);
    if ((retQuery == nullptr) || (retQuery->getRowCount() == 0)) {
        LOG_DEBUG("no results");
        LOG_DEBUG("No results");
        return ContactsTableRow();
    }


M module-gui/gui/core/DrawCommand.cpp => module-gui/gui/core/DrawCommand.cpp +1 -1
@@ 176,7 176,7 @@ namespace gui
    inline void DrawImage::checkImageSize(Context *ctx, ImageMap *image) const
    {
        if (image->getHeight() > ctx->getH() || image->getWidth() > ctx->getW()) {
            LOG_WARN("image %s {w: %d,h %d} > context {w %d,h %d}",
            LOG_WARN("Image %s {w: %d,h %d} > context {w %d,h %d}",
                     image->getName().c_str(),
                     image->getWidth(),
                     ctx->getW(),

M module-gui/gui/core/FontManager.cpp => module-gui/gui/core/FontManager.cpp +1 -1
@@ 133,7 133,7 @@ namespace gui
        for (const auto &entry : styleJson.object_items()) {
            auto fontName = entry.second.string_value();
            if (!std::filesystem::is_regular_file(fontFolder + "/" + fontName)) {
                LOG_ERROR("Could not find font: %s", fontName.c_str());
                LOG_WARN("Could not find font: %s", fontName.c_str());
            }
            else {
                LOG_INFO("Add font to list: %s - %s", entry.first.c_str(), fontName.c_str());

M module-gui/gui/core/ImageManager.cpp => module-gui/gui/core/ImageManager.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "ImageManager.hpp"


@@ 42,7 42,7 @@ namespace gui
    void ImageManager::clear()
    {
        for (ImageMap *imageMap : imageMaps) {
            LOG_INFO("deleting image: %s", imageMap->getName().c_str());
            LOG_INFO("Deleting image: %s", imageMap->getName().c_str());
            delete imageMap;
        }
        imageMaps.clear();

M module-gui/gui/core/RawFont.cpp => module-gui/gui/core/RawFont.cpp +2 -2
@@ 141,7 141,7 @@ namespace gui
            return glyph;
        }

        LOG_WARN("unsupported font glyph ID: %" PRIu32, glyph_id);
        LOG_WARN("Unsupported font glyph ID: %" PRIu32, glyph_id);
        return unsupported.get();
    }



@@ 173,7 173,7 @@ namespace gui
        }

        if ((start >= str.length()) || (start + count - 1 >= str.length())) {
            LOG_ERROR("incorrect string index provided");
            LOG_ERROR("Incorrect string index provided");
            return 0;
        }


M module-gui/gui/input/Profile.cpp => module-gui/gui/input/Profile.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <log/log.hpp>


@@ 49,7 49,7 @@ namespace gui
        auto _ = gsl::finally([fd] { std::fclose(fd); });

        if (err.length() != 0) {
            LOG_FATAL("%s", err.c_str());
            LOG_FATAL("Parsing json error: %s", err.c_str());
            return json11::Json();
        }
        return parsedJson;

M module-gui/gui/widgets/status-bar/SignalStrengthBar.cpp => module-gui/gui/widgets/status-bar/SignalStrengthBar.cpp +2 -2
@@ 53,7 53,7 @@ namespace gui::status_bar
    {
        try {
            if (img == nullptr) {
                LOG_ERROR("SignalStrength Image nullptr");
                LOG_ERROR("SignalStrength image nullptr");
                return;
            }



@@ 71,7 71,7 @@ namespace gui::status_bar
            }
        }
        catch (const std::exception &exception) {
            LOG_ERROR("%s", exception.what());
            LOG_ERROR("Exception while updating signal image: %s", exception.what());
        }
    }
} // namespace gui::status_bar

M module-gui/gui/widgets/text/core/cursors/TextBlockCursor.cpp => module-gui/gui/widgets/text/core/cursors/TextBlockCursor.cpp +4 -4
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "TextBlockCursor.hpp"


@@ 201,7 201,7 @@ namespace gui
        }
        auto block = currentBlock();
        if (block == blocksEnd()) {
            LOG_ERROR("add char to document with no text blocks shouldn't ever happen");
            LOG_ERROR("Add char to document with no text blocks shouldn't ever happen");
            return;
        }
        if (utf_val == text::newline) {


@@ 246,7 246,7 @@ namespace gui
    bool BlockCursor::removeChar()
    {
        if (checkNpos()) {
            LOG_ERROR("cant remove from not initialized/empty cursor");
            LOG_ERROR("Can't remove from uninitialized/empty cursor");
            return false;
        }



@@ 262,7 262,7 @@ namespace gui
        }

        if (block == blocksEnd()) {
            LOG_ERROR("removing char from document with no TextBlocks");
            LOG_ERROR("Removing char from document with no TextBlocks");
            return false;
        }


M module-gui/gui/widgets/text/modes/InputMode.cpp => module-gui/gui/widgets/text/modes/InputMode.cpp +1 -1
@@ 61,7 61,7 @@ void InputMode::next()
    if (input_mode_list_pos == input_mode_list.size()) {
        input_mode_list_pos = 0;
    }
    LOG_INFO("%" PRIu32, input_mode_list_pos);
    LOG_INFO("Position: %" PRIu32, input_mode_list_pos);
    show_input_type();
}


M module-gui/gui/widgets/text/parsers/RichTextParser.cpp => module-gui/gui/widgets/text/parsers/RichTextParser.cpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "RichTextParser.hpp"


@@ 109,7 109,7 @@ namespace text
                return true;
            }
            catch (const std::exception &exception) {
                LOG_ERROR("%s", exception.what());
                LOG_ERROR("Exception: %s", exception.what());
                return false;
            }
            return false;


@@ 159,7 159,7 @@ namespace text
                return true;
            }
            catch (const std::exception &exception) {
                LOG_ERROR("%s", exception.what());
                LOG_ERROR("Exception: %s", exception.what());
                return false;
            }
        }

M module-services/service-antenna/ServiceAntenna.cpp => module-services/service-antenna/ServiceAntenna.cpp +12 -15
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <AntennaMessage.hpp>


@@ 57,7 57,6 @@ ServiceAntenna::ServiceAntenna()
      state{std::make_unique<state::State<antenna::State>>(this)}, phoneModeObserver{
                                                                       std::make_unique<sys::phone_modes::Observer>()}
{
    LOG_INFO("[%s] Initializing", service::name::antenna);
    timer = sys::TimerFactory::createPeriodicTimer(
        this, "Antenna", std::chrono::seconds{5}, [this](sys::Timer & /*timer*/) {
            timer.stop();


@@ 87,7 86,6 @@ ServiceAntenna::ServiceAntenna()

ServiceAntenna::~ServiceAntenna()
{
    LOG_INFO("[%s] Cleaning resources", service::name::antenna);
}

// Invoked upon receiving data message


@@ 104,7 102,7 @@ sys::MessagePointer ServiceAntenna::DataReceivedHandler(sys::DataMessage *msgl, 
        if (CellularServiceAPI::GetAntenna(this, antenna)) {
            currentAntenna = antenna;
            if (state->get() == antenna::State::switchAntenna) {
                LOG_INFO("Antena switched.");
                LOG_INFO("Antenna switched");

                state->enableStateTimeout(cpp_freertos::Ticks::GetTicks(),
                                          pdMS_TO_TICKS(antenna::connectionStatusTimeout),


@@ 130,28 128,29 @@ sys::MessagePointer ServiceAntenna::DataReceivedHandler(sys::DataMessage *msgl, 
        break;
    }

    if (handled)
    if (handled) {
        return std::make_shared<sys::ResponseMessage>();
    else
        return std::make_shared<sys::ResponseMessage>(sys::ReturnCodes::Unresolved);
    }
    return std::make_shared<sys::ResponseMessage>(sys::ReturnCodes::Unresolved);
}

// Invoked during initialization
sys::ReturnCodes ServiceAntenna::InitHandler()
{
    registerMessageHandlers();
    LOG_INFO("Initialized");
    return sys::ReturnCodes::Success;
}

sys::ReturnCodes ServiceAntenna::DeinitHandler()
{
    LOG_INFO("Deinitialized");
    return sys::ReturnCodes::Success;
}

sys::ReturnCodes ServiceAntenna::SwitchPowerModeHandler(const sys::ServicePowerMode mode)
{
    LOG_FATAL("[ServiceEvtMgr] PowerModeHandler: %s", c_str(mode));

    LOG_INFO("New power mode: %s", c_str(mode));
    suspended = true;

    switch (mode) {


@@ 169,25 168,23 @@ sys::ReturnCodes ServiceAntenna::SwitchPowerModeHandler(const sys::ServicePowerM
void ServiceAntenna::handleLockRequest(antenna::lockState request)
{
    auto currentState = state->get();
    LOG_INFO("Current state: %s, requested stated: %s",
             magic_enum::enum_name(currentState).data(),
             magic_enum::enum_name(request).data());

    if (request == antenna::lockState::locked) {
        LOG_INFO("AntennaService lock request.");
        if (currentState != antenna::State::locked) {
            state->set(antenna::State::locked);
            serviceLocked = request;
            LOG_INFO("AntennaService locked.");
            return;
        }
        LOG_INFO("AntennaService lock request skipped.");
    }
    else if (request == antenna::lockState::unlocked) {
        LOG_INFO("AntennaService unlock request. Service state: %s", c_str(state->get()));
        if (currentState == antenna::State::locked) {
            state->set(state->getLast());
            serviceLocked = request;
            LOG_INFO("AntennaService unlocked. Restoring last state.");
            return;
        }
        LOG_INFO("AntennaService unlock request skipped.");
    }
}


M module-services/service-audio/AudioServiceAPI.cpp => module-services/service-audio/AudioServiceAPI.cpp +9 -7
@@ 23,18 23,20 @@ namespace AudioServiceAPI
    {
        auto SendAudioRequest(sys::Service *serv, std::shared_ptr<AudioMessage> msg)
        {
            auto msgType = static_cast<int>(msg->type);
            LOG_DEBUG("Msg type %d", msgType);
            LOG_DEBUG("Message type: %s", magic_enum::enum_name(msg->type).data());
            auto ret = serv->bus.sendUnicastSync(msg, service::name::audio, sys::BusProxy::defaultTimeout);
            if (ret.first == sys::ReturnCodes::Success) {
                if (auto resp = std::dynamic_pointer_cast<AudioResponseMessage>(ret.second)) {
                    LOG_DEBUG("Msg type %d done", msgType);
                    LOG_DEBUG("Message processed");
                    return resp;
                }
                LOG_ERROR("msgType %d - not AudioResponseMessage", msgType);
                LOG_ERROR("Response type not AudioResponseMessage, actual type: %s",
                          magic_enum::enum_name(ret.second->type).data());
                return std::make_shared<AudioResponseMessage>(audio::RetCode::Failed);
            }
            LOG_ERROR("Command %d Failed with %d error", msgType, static_cast<int>(ret.first));
            LOG_ERROR("Command %s Failed with %d error",
                      magic_enum::enum_name(msg->type).data(),
                      static_cast<int>(ret.first));
            return std::make_shared<AudioResponseMessage>(audio::RetCode::Failed);
        }
    } // namespace


@@ 189,7 191,7 @@ namespace AudioServiceAPI
                std::stoi(GetSetting(serv, audio::Setting::VibrationLevel, PlaybackType::System)));
        }
        catch (const std::logic_error &e) {
            LOG_ERROR("exception %s", e.what());
            LOG_ERROR("Setting vibration level failed: %s", e.what());
            return std::nullopt;
        }
    }


@@ 225,7 227,7 @@ namespace AudioServiceAPI
            return static_cast<audio::Volume>(std::stoi(GetSetting(serv, audio::Setting::Volume, playbackType)));
        }
        catch (const std::logic_error &e) {
            LOG_ERROR("exception %s", e.what());
            LOG_ERROR("Cannot get a volume: %s", e.what());
            return std::nullopt;
        }
    }

M module-services/service-audio/ServiceAudio.cpp => module-services/service-audio/ServiceAudio.cpp +5 -6
@@ 114,7 114,6 @@ ServiceAudio::ServiceAudio()
      cpuSentinel(std::make_shared<sys::CpuSentinel>(service::name::audio, this)),
      settingsProvider(std::make_unique<settings::Settings>())
{
    LOG_INFO("[ServiceAudio] Initializing");
    bus.channels.push_back(sys::BusChannel::ServiceAudioNotifications);

    auto sentinelRegistrationMsg = std::make_shared<sys::SentinelRegistrationMessage>(cpuSentinel);


@@ 136,7 135,6 @@ ServiceAudio::ServiceAudio()

ServiceAudio::~ServiceAudio()
{
    LOG_INFO("[ServiceAudio] Cleaning resources");
}

sys::ReturnCodes ServiceAudio::InitHandler()


@@ 151,13 149,15 @@ sys::ReturnCodes ServiceAudio::InitHandler()
        settingsProvider->registerValueChange(
            setting.first, [this](const std::string &name, const std::string &value) { settingsChanged(name, value); });
    }

    LOG_INFO("Initialized");
    return sys::ReturnCodes::Success;
}

sys::ReturnCodes ServiceAudio::DeinitHandler()
{

    settingsProvider->deinit();
    LOG_INFO("Deinitialized");
    return sys::ReturnCodes::Success;
}



@@ 215,7 215,6 @@ std::optional<std::string> ServiceAudio::AudioServicesCallback(const sys::Messag

sys::ReturnCodes ServiceAudio::SwitchPowerModeHandler(const sys::ServicePowerMode mode)
{
    LOG_FATAL("[ServiceAudio] PowerModeHandler: %s", c_str(mode));
    return sys::ReturnCodes::Success;
}



@@ 756,7 755,7 @@ std::string ServiceAudio::getSetting(const Setting &setting,
        return set_it->second;
    }

    LOG_ERROR("ServiceAudio::getSetting setting name %s does not exist", path.c_str());
    LOG_ERROR("Setting '%s' does not exist", path.c_str());
    return std::string{};
}



@@ 847,7 846,7 @@ void ServiceAudio::settingsChanged(const std::string &name, std::string value)
        s_it->second = value;
        return;
    }
    LOG_ERROR("ServiceAudio::settingsChanged received notification about not registered setting: %s", name.c_str());
    LOG_ERROR("Setting '%s' not registered", name.c_str());
}

void ServiceAudio::onVolumeChanged(const Volume volume, const VolumeChangeRequestSource source)

M module-services/service-bluetooth/ServiceBluetooth.cpp => module-services/service-bluetooth/ServiceBluetooth.cpp +3 -3
@@ 51,13 51,11 @@ namespace

ServiceBluetooth::ServiceBluetooth() : sys::Service(service::name::bluetooth, "", BluetoothServiceStackDepth)
{
    LOG_INFO("[ServiceBluetooth] Initializing");
    bus.channels.push_back(sys::BusChannel::ServiceCellularNotifications);
}

ServiceBluetooth::~ServiceBluetooth()
{
    LOG_INFO("[ServiceBluetooth] Cleaning resources");
}

sys::ReturnCodes ServiceBluetooth::InitHandler()


@@ 126,6 124,7 @@ sys::ReturnCodes ServiceBluetooth::InitHandler()
            settingsHolder->setValue(bluetooth::Settings::State, static_cast<int>(BluetoothStatus::State::Off));
        }
    };
    LOG_INFO("Initialized");

    return sys::ReturnCodes::Success;
}


@@ 135,6 134,7 @@ sys::ReturnCodes ServiceBluetooth::DeinitHandler()
    settingsHolder->deinit();
    worker->closeWorker();
    worker.reset();
    LOG_INFO("Deinitialized");
    return sys::ReturnCodes::Success;
}



@@ 152,7 152,7 @@ sys::MessagePointer ServiceBluetooth::DataReceivedHandler([[maybe_unused]] sys::

sys::ReturnCodes ServiceBluetooth::SwitchPowerModeHandler(const sys::ServicePowerMode mode)
{
    LOG_ERROR("TODO");
    // Implement power mode handler
    return sys::ReturnCodes::Success;
}


M module-services/service-bluetooth/service-bluetooth/BluetoothDevicesModel.cpp => module-services/service-bluetooth/service-bluetooth/BluetoothDevicesModel.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "BluetoothDevicesModel.hpp"


@@ 85,7 85,7 @@ void BluetoothDevicesModel::setInternalDeviceState(const Devicei &device, const 
{
    auto dev = getDeviceByAddress(device.address);
    if (not dev) {
        LOG_ERROR("no such device - ignored");
        LOG_ERROR("Device doesn't exist, ignored");
        return;
    }
    dev.value().get().deviceState = state;

M module-services/service-bluetooth/service-bluetooth/SettingsHolder.cpp => module-services/service-bluetooth/service-bluetooth/SettingsHolder.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "SettingsHolder.hpp"


@@ 26,7 26,7 @@ namespace bluetooth
        settingsMap[newSetting] = value;

        settingsProvider->setValue(settingString[newSetting], std::visit(StringVisitor(), value));
        LOG_INFO("setting %s set", settingString[newSetting].c_str());
        LOG_INFO("Setting '%s' set", settingString[newSetting].c_str());
    }
    SettingsHolder::SettingsHolder(std::unique_ptr<settings::Settings> settingsPtr)
        : settingsProvider(std::move(settingsPtr))

M module-services/service-cellular/CellularServiceAPI.cpp => module-services/service-cellular/CellularServiceAPI.cpp +5 -5
@@ 57,7 57,7 @@ std::string CellularServiceAPI::GetIMSI(sys::Service *serv, bool getFullIMSINumb
    cellular::ResponseMessage *response = dynamic_cast<cellular::ResponseMessage *>(ret.second.get());

    if (response == nullptr) {
        LOG_ERROR("CellularServiceAPI::GetIMSI failed");
        LOG_ERROR("Failed to get IMSI");
        return std::string();
    }



@@ 65,7 65,7 @@ std::string CellularServiceAPI::GetIMSI(sys::Service *serv, bool getFullIMSINumb
        return response->data;
    }
    else {
        LOG_ERROR("CellularServiceAPI::GetIMSI failed");
        LOG_ERROR("Failed to get IMSI");
        return std::string();
    }
}


@@ 176,7 176,7 @@ bool CellularServiceAPI::GetFirmwareVersion(sys::Service *serv, std::string &res
    if (ret.first == sys::ReturnCodes::Success) {
        auto celResponse = std::dynamic_pointer_cast<cellular::ResponseMessage>(ret.second);
        if ((celResponse != nullptr) && (celResponse->retCode == true)) {
            LOG_DEBUG("Modem Firmware: %s", celResponse->data.c_str());
            LOG_DEBUG("Modem firmware: %s", celResponse->data.c_str());
            response = celResponse->data;
            return true;
        }


@@ 249,7 249,7 @@ bool CellularServiceAPI::IsCallInProgress(sys::Service *serv, bool &response)
    if (ret.first == sys::ReturnCodes::Success) {
        auto celResponse = std::dynamic_pointer_cast<cellular::IsCallActiveResponse>(ret.second);
        if ((celResponse != nullptr) && (celResponse->retCode == sys::ReturnCodes::Success)) {
            LOG_DEBUG("Is Call in progress: %d", celResponse->active);
            LOG_DEBUG("Is call in progress: %s", celResponse->active ? "yes" : "no");
            response = celResponse->active;
            return true;
        }


@@ 265,7 265,7 @@ bool CellularServiceAPI::IsCallStateForCallApplicationActive(sys::Service *serv,
    if (ret.first == sys::ReturnCodes::Success) {
        auto celResponse = std::dynamic_pointer_cast<cellular::IsCallActiveResponse>(ret.second);
        if ((celResponse != nullptr) && (celResponse->retCode == sys::ReturnCodes::Success)) {
            LOG_DEBUG("Is Call in active for ApplicationCall: %d", celResponse->active);
            LOG_DEBUG("Is call in active for ApplicationCall: %d", celResponse->active);
            response = celResponse->active;
            return true;
        }

M module-services/service-cellular/CellularUrcHandler.cpp => module-services/service-cellular/CellularUrcHandler.cpp +5 -5
@@ 15,7 15,7 @@ using namespace at::urc;

void CellularUrcHandler::Handle(Clip &urc)
{
    LOG_TRACE("incoming call...");
    LOG_TRACE("Incoming call");
    std::string phoneNumber;
    if (urc.isValid()) {
        phoneNumber = urc.getNumber();


@@ 64,7 64,7 @@ void CellularUrcHandler::Handle(Creg &urc)

void CellularUrcHandler::Handle(Cmti &urc)
{
    LOG_TRACE("received new SMS notification");
    LOG_TRACE("Received new SMS notification");
    if (urc.isValid()) {
        response = std::make_unique<cellular::NewIncomingSMSNotification>(urc.getIndex());
        urc.setHandled(true);


@@ 127,7 127,7 @@ void CellularUrcHandler::Handle(Qind &urc)
        // Received signal strength change
        auto rssi = urc.getRSSI();
        if (!rssi) {
            LOG_INFO("Invalid csq - ignore");
            LOG_WARN("Invalid csq - ignore");
            AntennaServiceAPI::InvalidCSQNotification(&cellularService);
        }
        else {


@@ 171,7 171,7 @@ void CellularUrcHandler::Handle(Cpin &urc)
    if (urc.isValid()) {
        auto state = urc.getState();
        if (!state) {
            LOG_INFO("Invalid cpin - ignore");
            LOG_WARN("Invalid cpin - ignore");
        }
        else {
            response = std::make_unique<cellular::internal::msg::HandleATSimStateChange>(*state);


@@ 216,7 216,7 @@ void CellularUrcHandler::Handle(UrcResponse &urc)

    for (auto &t : typesToHandle) {
        if (t == urc.getURCResponseType()) {
            LOG_INFO("call (aborted|missed) type: %s", magic_enum::enum_name(t).data());
            LOG_INFO("Call (aborted|missed) type: %s", magic_enum::enum_name(t).data());
            response = std::make_unique<cellular::CallAbortedNotification>();
            urc.setHandled(true);
        }

M module-services/service-cellular/PacketData.cpp => module-services/service-cellular/PacketData.cpp +6 -6
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "PacketData.hpp"


@@ 197,7 197,7 @@ namespace packet_data
            contextMap[apnConfig->contextId] = apnConfig;
        }

        LOG_DEBUG("loadAPNSettings");
        LOG_DEBUG("APN settings loaded");
    }

    std::string PacketData::saveAPNSettings() const


@@ 208,14 208,14 @@ namespace packet_data
        std::transform(contextMap.begin(), contextMap.end(), std::back_inserter(vec), [](auto &apn) {
            return apn.second->to_json();
        });
        LOG_DEBUG("saveAPNSettings");
        LOG_DEBUG("APN settings saved");

        return json11::Json(vec).dump();
    }

    at::Result::Code PacketData::updateAPNSettings(std::uint8_t ctxId)
    {
        LOG_DEBUG("updateAPNSettings %d", ctxId);
        LOG_DEBUG("Updating APN settings: %d", ctxId);
        PDPContext pdpCtx(cellularService);
        std::shared_ptr<APN::Config> apnConfig;
        std::shared_ptr<APN::Config> modemApn;


@@ 233,7 233,7 @@ namespace packet_data
            else {
                if (!phoneApn->second->compare(modemApn)) {
                    /// rebuild configuration
                    LOG_DEBUG("Update modem context %d", ctxId);
                    LOG_DEBUG("Update modem context: %d", ctxId);
                    if (ctxId > internalAPNMaxId) {
                        return pdpCtx.setConfiguration(phoneApn->second);
                    }


@@ 248,7 248,7 @@ namespace packet_data
            if (!modemApn->isEmpty()) {
                /** update phone configuration base on modem conf (eg. ims)
                 */
                LOG_DEBUG("Update modem context %d", ctxId);
                LOG_DEBUG("Update modem context: %d", ctxId);
                if (ctxId > internalAPNMaxId) {
                    return pdpCtx.setConfiguration(modemApn, true);
                }

M module-services/service-cellular/ServiceCellular.cpp => module-services/service-cellular/ServiceCellular.cpp +7 -11
@@ 125,7 125,6 @@ ServiceCellular::ServiceCellular()
      phoneModeObserver{std::make_unique<sys::phone_modes::Observer>()},
      priv{std::make_unique<internal::ServiceCellularPriv>(this)}
{
    LOG_INFO("[ServiceCellular] Initializing");

    bus.channels.push_back(sys::BusChannel::ServiceCellularNotifications);
    bus.channels.push_back(sys::BusChannel::ServiceDBNotifications);


@@ 190,7 189,6 @@ ServiceCellular::ServiceCellular()

ServiceCellular::~ServiceCellular()
{
    LOG_INFO("[ServiceCellular] Cleaning resources");
}

void ServiceCellular::SleepTimerHandler()


@@ 220,7 218,6 @@ void ServiceCellular::WakeUpHandler()

void ServiceCellular::CallStateTimerHandler()
{
    LOG_DEBUG("CallStateTimerHandler");
    auto msg = std::make_shared<cellular::ListCallsMessage>();
    bus.sendUnicast(std::move(msg), ::service::name::cellular);
}


@@ 255,7 252,7 @@ sys::ReturnCodes ServiceCellular::InitHandler()

    const auto rawVolteSetting = settings->getValue(settings::Cellular::volteEnabled, settings::SettingsScope::Global);
    if (rawVolteSetting.empty()) {
        LOG_ERROR("[VoLTE] setting missing in database - defaulting to disabled");
        LOG_ERROR("VoLTE setting missing in database - defaulting to disabled");
        settings->setValue(settings::Cellular::volteEnabled, "0", settings::SettingsScope::Global);
    }



@@ 281,12 278,14 @@ sys::ReturnCodes ServiceCellular::InitHandler()

    cmux->registerCellularDevice();

    LOG_INFO("Initialized");
    return sys::ReturnCodes::Success;
}

sys::ReturnCodes ServiceCellular::DeinitHandler()
{
    settings->deinit();
    LOG_INFO("Deinitialized");
    return sys::ReturnCodes::Success;
}



@@ 295,8 294,6 @@ void ServiceCellular::ProcessCloseReason(sys::CloseReason closeReason)

sys::ReturnCodes ServiceCellular::SwitchPowerModeHandler(const sys::ServicePowerMode mode)
{
    LOG_INFO("[ServiceCellular] PowerModeHandler: %s", c_str(mode));

    switch (mode) {
    case sys::ServicePowerMode::Active:
        cmux->exitSleepMode();


@@ 608,7 605,7 @@ void ServiceCellular::registerMessageHandlers()
        auto message = static_cast<cellular::SwitchVolteOnOffRequest *>(request);
        auto channel = cmux->get(CellularMux::Channel::Commands);
        if (channel == nullptr) {
            LOG_ERROR("[VoLTE] failed to get channel, skipping request");
            LOG_ERROR("Skipping VoLTE request, failed to get channel");
            return sys::MessageNone{};
        }
        settings->setValue(


@@ 632,7 629,7 @@ void ServiceCellular::registerMessageHandlers()

    connect(typeid(cellular::msg::notification::SimReady), [&](sys::Message *) {
        if (priv->volteHandler->isFunctionalityResetNeeded()) {
            LOG_INFO("[VoLTE] first run after switching - functionality reset needed");
            LOG_INFO("First run after switching VoLTE - functionality reset needed");
            priv->modemResetHandler->performFunctionalityReset();
            return sys::MessageNone{};
        }


@@ 722,7 719,6 @@ void ServiceCellular::change_state(cellular::StateChange *msg)

bool ServiceCellular::handle_idle()
{
    LOG_DEBUG("Idle");
    return true;
}



@@ 782,7 778,7 @@ bool ServiceCellular::handle_power_up_procedure()
    }
    case bsp::Board::none:
    default:
        LOG_FATAL("Board not known!");
        LOG_FATAL("Unknown board!");
        assert(0);
        break;
    }


@@ 889,7 885,7 @@ bool ServiceCellular::handle_audio_conf_procedure()

        if (cmux->startMultiplexer() == CellularMux::ConfState::Success) {

            LOG_DEBUG("[ServiceCellular] Modem is fully operational");
            LOG_DEBUG("Modem is fully operational");
            // open channel - notifications
            DLCChannel *notificationsChannel = cmux->get(CellularMux::Channel::Notifications);
            if (notificationsChannel != nullptr) {

M module-services/service-cellular/call/CellularCall.cpp => module-services/service-cellular/call/CellularCall.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "call/CellularCall.hpp"


@@ 36,7 36,7 @@ namespace call
    Call &Call::operator=(Call &&other) noexcept
    {
        if (not other.machine) {
            LOG_ERROR("operator= on wrong call");
            LOG_ERROR("On wrong call");
            return *this;
        }
        machine = std::make_unique<StateMachine>(std::move(other.machine->di));

M module-services/service-cellular/call/api/ModemCallApi.cpp => module-services/service-cellular/call/api/ModemCallApi.cpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "ModemCallApi.hpp"


@@ 16,13 16,13 @@ namespace cellular
    bool Api::handleEvent(at::AT modemCommand)
    {
        if (!cellular->cmux) {
            LOG_INFO("no cmux at this time - ignoring request");
            LOG_INFO("No cmux at this time - ignoring request");
            return false;
        }

        auto channel = cellular->cmux->get(CellularMux::Channel::Commands);
        if (!channel) {
            LOG_INFO("no cmux command channel at this time - ignoring request");
            LOG_INFO("No cmux command channel at this time - ignoring request");
            return false;
        }


M module-services/service-cellular/checkSmsCenter.cpp => module-services/service-cellular/checkSmsCenter.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "checkSmsCenter.hpp"


@@ 14,7 14,7 @@
    if (!centerResponse) {
        success = false;
        if (centerResponse.code == at::Result::Code::PARSING_ERROR) {
            LOG_FATAL("possibly unrecoverable SMS center value error!");
            LOG_FATAL("Possibly unrecoverable SMS center value error!");
        }
    }
    return success;

M module-services/service-cellular/src/SimCard.cpp => module-services/service-cellular/src/SimCard.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "SimCard.hpp"


@@ 394,7 394,7 @@ namespace cellular
                    onSimSelected();
                }
                else {
                    LOG_ERROR("onSimSelected callback is missing");
                    LOG_ERROR("Callback is missing");
                }
            }
        }

M module-services/service-cellular/src/VolteHandler.hpp => module-services/service-cellular/src/VolteHandler.hpp +2 -2
@@ 40,7 40,7 @@ namespace cellular::service
        {
            if (!permit) {
                if (enable) {
                    LOG_INFO("[VoLTE] requested to enable, but not permitted for this operator - disabling");
                    LOG_INFO("Requested to enable VoLTE, but not permitted for this operator - disabling");
                }

                enable = false;


@@ 51,7 51,7 @@ namespace cellular::service
                auto voiceDomainAnswer =
                    channel.cmd(factory(at::AT::QNVFW) + NetworkServiceDomain(NetworkServiceDomain::Type::Voice));
                if (!voiceDomainAnswer) {
                    throw std::runtime_error("[VoLTE] failed to set voice domain before trying to enable VoLTE");
                    throw std::runtime_error("Failed to set voice domain before trying to enable VoLTE");
                }

                auto smsDomainAnswer =

M module-services/service-cellular/src/VolteHandlerImpl.cpp => module-services/service-cellular/src/VolteHandlerImpl.cpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "VolteHandlerImpl.hpp"


@@ 11,12 11,12 @@ namespace cellular::internal

        std::pair<IMSState, VoLTEIMSState> parsed;
        if (!at::response::parseQCFG_IMS(response, parsed)) {
            throw std::runtime_error("[VoLTE] unable to parse modem's response to QCFG with IMS");
            throw std::runtime_error("Unable to parse modem's response to QCFG with IMS");
        }

        auto const &ims          = parsed.first;
        bool stateMatchesRequest = (ims != IMSState::Disable) == requestedState;
        LOG_INFO("[VoLTE] current IMS state: %s which %s expectation",
        LOG_INFO("Current IMS state: %s which %s expectation",
                 magic_enum::enum_name(ims).data(),
                 ((stateMatchesRequest) ? "matches" : "doesn't match"));
        return stateMatchesRequest;

M module-services/service-cellular/src/ussd/USSDHandler.cpp => module-services/service-cellular/src/ussd/USSDHandler.cpp +3 -3
@@ 59,7 59,7 @@ namespace cellular::ussd
    void USSDHandler::setUSSDTimer()
    {
        if (not onTimerStart || not onTimerStop) {
            LOG_ERROR("No onTimerStart or onTimerStop callback provided!");
            LOG_ERROR("No callback provided!");
            return;
        }
        switch (ussdState) {


@@ 98,7 98,7 @@ namespace cellular::ussd
            setUSSDTimer();
            return true;
        default:
            LOG_WARN("unexpected URC handling state: %s", magic_enum::enum_name(ussdState).data());
            LOG_WARN("Unexpected URC handling state: %s", magic_enum::enum_name(ussdState).data());
            return false;
        }
    }


@@ 106,7 106,7 @@ namespace cellular::ussd
    bool USSDHandler::ussdSessionTimeout()
    {
        if (!onTimerGetState) {
            LOG_ERROR("No onTimerGetState callback provided!");
            LOG_ERROR("No callback provided!");
            return false;
        }


M module-services/service-cellular/src/volte/VolteCapabilityHandler.cpp => module-services/service-cellular/src/volte/VolteCapabilityHandler.cpp +2 -2
@@ 16,7 16,7 @@ namespace cellular::service
    {
        const auto &imsi = cellularInterface->getImsi(channel);
        if (!imsi.has_value()) {
            LOG_ERROR("[VoLTE] failed to read IMSI - VoLTE not permitted");
            LOG_ERROR("VoLTE not permitted - failed to read IMSI");
            return false;
        }



@@ 27,7 27,7 @@ namespace cellular::service
    {
        const auto &imsi = cellularInterface->getImsi(channel);
        if (!imsi.has_value()) {
            LOG_ERROR("[VoLTE] failed to read IMSI - VoLTE not permitted");
            LOG_ERROR("VoLTE not permitted - failed to read IMSI");
            return ImsiParser::SupportStatus::Unsupported;
        }


M module-services/service-cellular/src/volte/VolteCapabilityHandlerCellular.cpp => module-services/service-cellular/src/volte/VolteCapabilityHandlerCellular.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "VolteCapabilityHandlerCellular.hpp"


@@ 11,7 11,7 @@ namespace cellular::service
    {
        auto result = channel.cmd(at::AT::CIMI);
        if (not result) {
            LOG_ERROR("[VoLTE] failed to read IMSI - will disable VoLTE");
            LOG_ERROR("Failed to read IMSI - will disable VoLTE");
            return std::nullopt;
        }


M module-services/service-db/ServiceDBCommon.cpp => module-services/service-db/ServiceDBCommon.cpp +5 -1
@@ 16,7 16,6 @@ namespace

ServiceDBCommon::ServiceDBCommon() : sys::Service(service::name::db, "", serviceDbStackSize, sys::ServicePriority::Idle)
{
    LOG_INFO("[ServiceDB] Initializing");
}

db::Interface *ServiceDBCommon::getInterface(db::Interface::Name interface)


@@ 65,8 64,11 @@ sys::MessagePointer ServiceDBCommon::DataReceivedHandler(sys::DataMessage *msgl,
sys::ReturnCodes ServiceDBCommon::InitHandler()
{
    if (const auto isSuccess = Database::initialize(); !isSuccess) {
        LOG_ERROR("Failed to initialize");

        return sys::ReturnCodes::Failure;
    }
    LOG_INFO("Initialized");
    return sys::ReturnCodes::Success;
}



@@ 79,6 81,8 @@ sys::ReturnCodes ServiceDBCommon::DeinitHandler()
    if (const auto isSuccess = Database::deinitialize(); !isSuccess) {
        return sys::ReturnCodes::Failure;
    }
    LOG_INFO("Deinitialized");

    return sys::ReturnCodes::Success;
}


M module-services/service-db/agents/quotes/QuotesAgent.cpp => module-services/service-db/agents/quotes/QuotesAgent.cpp +1 -1
@@ 110,7 110,7 @@ namespace Quotes
    {
        auto req                  = std::dynamic_pointer_cast<Messages::ReadRandomizedQuoteRequest>(query);
        auto [type, randomizedId] = randomizedQuoteModel.getId();
        LOG_DEBUG("Randomized id: %d, type: %d", randomizedId, static_cast<int>(type));
        LOG_DEBUG("Randomized id: %d, type: %s", randomizedId, magic_enum::enum_name(type).data());
        std::unique_ptr<QueryResult> queryResult;

        if (type == QuoteType::Predefined) {

M module-services/service-db/agents/quotes/RandomizedQuoteModel.cpp => module-services/service-db/agents/quotes/RandomizedQuoteModel.cpp +2 -2
@@ 87,9 87,9 @@ namespace Quotes
            settings->setValue(
                settings::Quotes::randomQuotesList, serializer->serialize(list), settings::SettingsScope::Global);
        }
        LOG_DEBUG("Selected quote ID: %d, type: %d, remaining quotes to next shuffle: %zu",
        LOG_DEBUG("Selected quote ID: %d, type: %s, remaining quotes to next shuffle: %zu",
                  list.front().second,
                  static_cast<int>(list.front().first),
                  magic_enum::enum_name(list.front().first).data(),
                  list.size());
    }
    auto RandomizedQuoteModel::isIdExpired() -> bool

M module-services/service-db/agents/settings/SettingsAgent.cpp => module-services/service-db/agents/settings/SettingsAgent.cpp +3 -3
@@ 118,7 118,7 @@ auto SettingsAgent::handleSetVariable(sys::Message *req) -> sys::MessagePointer
                    auto updateMsg =
                        std::make_shared<settings::Messages::VariableChanged>(regPath, value, oldValue.value_or(""));
                    parentService->bus.sendUnicast(std::move(updateMsg), regPath.service);
                    LOG_DEBUG("[SettingsAgent::handleSetVariable] notified service: %s", regPath.service.c_str());
                    LOG_DEBUG("SettingsAgent notified service: %s", regPath.service.c_str());
                }
            }
        }


@@ 141,7 141,7 @@ auto SettingsAgent::handleRegisterOnVariableChange(sys::Message *req) -> sys::Me
                return std::make_shared<sys::ResponseMessage>();
            }
            auto currentValue = dbGetValue(path).value_or("");
            LOG_DEBUG("[SettingsAgent::handleRegisterOnVariableChange] %s", path.to_string().c_str());
            LOG_DEBUG("SettingsAgent handled register for: %s", path.to_string().c_str());
            auto msgValue =
                std::make_shared<::settings::Messages::VariableChanged>(std::move(path), std::move(currentValue), "");
            parentService->bus.sendUnicast(std::move(msgValue), msg->sender);


@@ 156,7 156,7 @@ auto SettingsAgent::handleUnregisterOnVariableChange(sys::Message *req) -> sys::
        auto path = msg->getPath();
        if (dbUnregisterValueChange(path)) {
            if (auto it = variableChangeRecipients.find(path.to_string()); it != variableChangeRecipients.end()) {
                LOG_DEBUG("[SettingsAgent::handleUnregisterOnVariableChange] %s", path.to_string().c_str());
                LOG_DEBUG("SettingsAgent handled unregister for: %s", path.to_string().c_str());
                it->second.erase(path);
            }
        }

M module-services/service-desktop/ServiceDesktop.cpp => module-services/service-desktop/ServiceDesktop.cpp +5 -4
@@ 22,7 22,6 @@ ServiceDesktop::ServiceDesktop(const std::filesystem::path &mtpRootPath)
          [this](sys::Timer & /*timer*/) { outboxNotifications.clearNotifications(); })},
      mtpRootPath{mtpRootPath}
{
    LOG_INFO("[ServiceDesktop] Initializing");
    bus.channels.push_back(sys::BusChannel::PhoneLockChanges);
    bus.channels.push_back(sys::BusChannel::ServiceDBNotifications);
    bus.channels.push_back(sys::BusChannel::USBNotifications);


@@ 30,7 29,6 @@ ServiceDesktop::ServiceDesktop(const std::filesystem::path &mtpRootPath)

ServiceDesktop::~ServiceDesktop()
{
    LOG_INFO("[ServiceDesktop] Cleaning resources");
}

sys::ReturnCodes ServiceDesktop::InitHandler()


@@ 55,11 53,13 @@ sys::ReturnCodes ServiceDesktop::InitHandler()

    checkChargingCondition();

    LOG_INFO("Initialized");
    return sys::ReturnCodes::Success;
}

sys::ReturnCodes ServiceDesktop::DeinitHandler()
{
    LOG_INFO("Deinitialized");
    return usbWorkerDeinit();
}



@@ 80,11 80,11 @@ sys::MessagePointer ServiceDesktop::DataReceivedHandler(sys::DataMessage * /*msg
    if (auto queryResponse = dynamic_cast<db::QueryResponse *>(resp)) {
        auto result = queryResponse->getResult();
        if (result == nullptr) {
            LOG_ERROR("Wrong result - nullptr!");
            LOG_ERROR("Wrong result: nullptr!");
            return response;
        }
        if (result->hasListener()) {
            LOG_DEBUG("Handling result...");
            LOG_DEBUG("Handling result");
            result->handle();
        }
    }


@@ 211,6 211,7 @@ auto ServiceDesktop::usbWorkerDeinit() -> sys::ReturnCodes
    desktopWorker.reset();
    initialized     = false;
    isUsbConfigured = false;
    LOG_DEBUG("USB worker deinitialized");
    // It must be run after the worker is closed.
    cleanFileSystemEndpointUndeliveredTransfers();
    return sys::ReturnCodes::Success;

M module-services/service-desktop/Sync.cpp => module-services/service-desktop/Sync.cpp +18 -17
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <service-desktop/Sync.hpp>


@@ 23,7 23,7 @@ static bool isValidDirentry(const std::filesystem::directory_entry &direntry)
Sync::CompletionCode Sync::PrepareSyncPackage(sys::Service *ownerService, std::filesystem::path &path)
{
    assert(ownerService != nullptr);
    LOG_INFO("Sync package preparation started...");
    LOG_DEBUG("Sync package preparation started");

    if (!Sync::RemoveSyncDir(path)) {
        return CompletionCode::FSError;


@@ 33,9 33,8 @@ Sync::CompletionCode Sync::PrepareSyncPackage(sys::Service *ownerService, std::f
        return CompletionCode::FSError;
    }

    LOG_DEBUG("Sync package preparation started...");
    if (!DBServiceAPI::DBPrepareSyncPackage(ownerService, path)) {
        LOG_ERROR("Sync package preparation, quitting...");
        LOG_ERROR("Sync package preparation failed, quiting");
        Sync::RemoveSyncDir(path);
        return CompletionCode::DBError;
    }


@@ 51,6 50,8 @@ Sync::CompletionCode Sync::PrepareSyncPackage(sys::Service *ownerService, std::f
        return CompletionCode::FSError;
    }

    LOG_DEBUG("Sync package preparation finished");

    return CompletionCode::Success;
}



@@ 58,11 59,11 @@ bool Sync::RemoveSyncDir(const std::filesystem::path &path)
{
    /* prepare directories */
    if (std::filesystem::is_directory(path)) {
        LOG_INFO("Removing sync directory %s...", path.c_str());
        LOG_DEBUG("Removing sync directory: %s", path.c_str());
        std::error_code errorCode;

        if (std::filesystem::remove_all(path, errorCode) == 0) {
            LOG_ERROR("Removing sync directory %s failed, error: %d.", path.c_str(), errorCode.value());
            LOG_ERROR("Removing sync directory '%s' failed, error: %d.", path.c_str(), errorCode.value());
            return false;
        }
    }


@@ 72,7 73,7 @@ bool Sync::RemoveSyncDir(const std::filesystem::path &path)

bool Sync::CreateSyncDir(const std::filesystem::path &path)
{
    LOG_INFO("Creating sync directory %s...", path.c_str());
    LOG_INFO("Creating sync directory: %s", path.c_str());
    if (std::filesystem::exists(path)) {
        LOG_ERROR("Sync directory already exists!");
        return false;


@@ 88,7 89,7 @@ bool Sync::CreateSyncDir(const std::filesystem::path &path)
bool Sync::PackSyncFiles(const std::filesystem::path &path)
{
    if (std::filesystem::is_empty(path)) {
        LOG_ERROR("Sync dir is empty, quitting...");
        LOG_ERROR("Sync dir is empty, quitting");
        return false;
    }



@@ 102,11 103,11 @@ bool Sync::PackSyncFiles(const std::filesystem::path &path)
        }
    });

    LOG_INFO("Opening tar %s file...", tarFilePath.c_str());
    LOG_INFO("Opening tar %s file", tarFilePath.c_str());

    int ret = mtar_open(&tarFile, tarFilePath.c_str(), "w");
    if (ret != MTAR_ESUCCESS) {
        LOG_ERROR("Opening tar file failed, quitting...");
        LOG_ERROR("Opening tar file failed, quitting");
        return false;
    }
    isTarFileOpen = true;


@@ 121,8 122,8 @@ bool Sync::PackSyncFiles(const std::filesystem::path &path)
            continue;
        }

        LOG_INFO("Archiving file ...");
        LOG_DEBUG("Writing tar header ...");
        LOG_DEBUG("Archiving file ");
        LOG_DEBUG("Writing tar header");

        if (mtar_write_file_header(&tarFile,
                                   direntry.path().filename().c_str(),


@@ 155,21 156,21 @@ bool Sync::PackSyncFiles(const std::filesystem::path &path)
            fileStream.read(fileStreamBuffer.get(), readSize);

            if (mtar_write_data(&tarFile, fileStreamBuffer.get(), readSize) != MTAR_ESUCCESS) {
                LOG_ERROR("Writing into sync package failed, quitting...");
                LOG_ERROR("Writing into sync package failed, quitting");
                return false;
            }
        }
    }

    LOG_INFO("Finalizing tar file...");
    LOG_DEBUG("Finalizing tar file");
    if (mtar_finalize(&tarFile) != MTAR_ESUCCESS) {
        LOG_ERROR("Finalizing tar file failed, quitting....");
        LOG_ERROR("Finalizing tar file failed, quitting");
        return false;
    }

    LOG_INFO("Closing tar file...");
    LOG_INFO("Closing tar file");
    if (mtar_close(&tarFile) != MTAR_ESUCCESS) {
        LOG_ERROR("Closing tar file failed, quitting...");
        LOG_ERROR("Closing tar file failed, quitting");
        return false;
    }
    isTarFileOpen = false;

M module-services/service-desktop/WorkerDesktop.cpp => module-services/service-desktop/WorkerDesktop.cpp +8 -12
@@ 70,8 70,6 @@ void WorkerDesktop::closeWorker(void)
    }

    initialized = false;
    LOG_INFO("we can deinit worker now");

    /// additional wait to flush on serial - we should wait for data sent...
    vTaskDelay(500);



@@ 86,8 84,6 @@ void WorkerDesktop::closeWorker(void)
        LOG_ERROR("Sentinel %s could not be removed!", cpuSentinel->GetName().c_str());
    }
    cpuSentinel.reset();

    LOG_DEBUG("deinit end");
}

void WorkerDesktop::reset()


@@ 141,7 137,7 @@ bool WorkerDesktop::handleMessage(std::uint32_t queueID)
        result = handleSignallingQueueMessage(queue);
    }
    else {
        LOG_INFO("handleMessage got message on an unhandled queue '%s'!", qname.c_str());
        LOG_WARN("Unhandled queue '%s'!", qname.c_str());
    }

    return result;


@@ 154,7 150,7 @@ bool WorkerDesktop::handleReceiveQueueMessage(std::shared_ptr<sys::WorkerQueue> 
    }
    std::string *receivedMsg = nullptr;
    if (!queue->Dequeue(&receivedMsg, 0)) {
        LOG_ERROR("handleMessage xQueueReceive failed for '%s'.", sdesktop::cdcReceiveQueueName);
        LOG_ERROR("Failed dequeue for '%s'.", sdesktop::cdcReceiveQueueName);
        return false;
    }



@@ 176,13 172,13 @@ bool WorkerDesktop::handleSendQueueMessage(std::shared_ptr<sys::WorkerQueue> &qu
    }
    std::string *sendMsg = nullptr;
    if (!queue->Dequeue(&sendMsg, 0)) {
        LOG_ERROR("handleMessage xQueueReceive failed for '%s'.", sdesktop::cdcSendQueueName);
        LOG_ERROR("Failed dequeue for '%s'.", sdesktop::cdcSendQueueName);
        return false;
    }

    const std::uint32_t dataSent = bsp::usbCDCSend(sendMsg);
    if (dataSent != sendMsg->length()) {
        LOG_ERROR("Data not sent! Data sent: %" PRIu32 "B, msg length: %zuB", dataSent, sendMsg->length());
        LOG_ERROR("Data not sent! (Data sent: %" PRIu32 "B, msg length: %zuB)", dataSent, sendMsg->length());
    }

    delete sendMsg;


@@ 198,13 194,13 @@ bool WorkerDesktop::handleServiceQueueMessage(std::shared_ptr<sys::WorkerQueue> 

    sys::WorkerCommand cmd;
    if (serviceQueue.Dequeue(&cmd, 0)) {
        LOG_DEBUG("Received cmd: %d", static_cast<int>(cmd.command));
        LOG_DEBUG("Received command: %d", static_cast<int>(cmd.command));
#if defined(DEBUG)
        assert(false);
#endif
    }
    else {
        LOG_ERROR("handleMessage xQueueReceive failed for '%s'.", SERVICE_QUEUE_NAME.c_str());
        LOG_ERROR("Failed dequeue for '%s'.", SERVICE_QUEUE_NAME.c_str());
        return false;
    }
    return true;


@@ 214,7 210,7 @@ bool WorkerDesktop::handleIrqQueueMessage(std::shared_ptr<sys::WorkerQueue> &que
{
    bsp::USBDeviceStatus notification = bsp::USBDeviceStatus::Disconnected;
    if (!queue->Dequeue(&notification, 0)) {
        LOG_ERROR("handleMessage xQueueReceive failed for %s.", sdesktop::irqQueueName);
        LOG_ERROR("Failed dequeue for %s.", sdesktop::irqQueueName);
        return false;
    }



@@ 266,7 262,7 @@ bool WorkerDesktop::handleSignallingQueueMessage(std::shared_ptr<sys::WorkerQueu

    sys::WorkerCommand cmd;
    if (!queue->Dequeue(&cmd, 0)) {
        LOG_ERROR("handleMessage xQueueReceive failed for '%s'.", sdesktop::signallingQueueName);
        LOG_ERROR("Failed dequeue for '%s'.", sdesktop::signallingQueueName);
        return false;
    }


M module-services/service-desktop/endpoints/Endpoint.cpp => module-services/service-desktop/endpoints/Endpoint.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <endpoints/Endpoint.hpp>


@@ 23,7 23,7 @@ namespace sdesktop::endpoints
    {
        context.setResponseStatus(http::Code::Forbidden);
        sender::putToSendQueue(context.createSimpleResponse());
        LOG_INFO("Endpoint #%d secured", static_cast<int>(context.getEndpoint()));
        LOG_INFO("Endpoint '%s' secured", magic_enum::enum_name(context.getEndpoint()).data());
    }

} // namespace sdesktop::endpoints

M module-services/service-desktop/endpoints/bluetooth/BluetoothHelper.cpp => module-services/service-desktop/endpoints/bluetooth/BluetoothHelper.cpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <endpoints/bluetooth/BluetoothHelper.hpp>


@@ 42,11 42,11 @@ namespace sdesktop::endpoints
            const auto &power = state[btConsts::states::power];
            if (power == json::bluetooth::on) {
                status.state = BluetoothStatus::State::On;
                LOG_INFO("turning on BT from harness!");
                LOG_INFO("Turning on BT from harness!");
            }
            else if (power == json::bluetooth::off) {
                status.state = BluetoothStatus::State::Off;
                LOG_INFO("turning off BT from harness!");
                LOG_INFO("Turning off BT from harness!");
            }
            const auto &visibility = state[btConsts::states::visibility];
            status.visibility      = visibility == json::bluetooth::on;

M module-services/service-desktop/endpoints/developerMode/DeveloperModeHelper.cpp => module-services/service-desktop/endpoints/developerMode/DeveloperModeHelper.cpp +2 -2
@@ 62,7 62,7 @@ namespace sdesktop::endpoints
            using namespace sdesktop::developerMode;
            auto cmd     = body[json::developerMode::AT].string_value();
            auto timeout = std::chrono::milliseconds(body[json::developerMode::timeout].int_value());
            LOG_DEBUG("at request sent with timeout >%d<", int(timeout.count()));
            LOG_DEBUG("At request sent with timeout >%d<", int(timeout.count()));
            auto event = std::make_unique<ATResponseEvent>(cmd, timeout);
            auto msg   = std::make_shared<DeveloperModeRequest>(std::move(event));
            code       = toCode(owner->bus.sendUnicast(msg, service::name::cellular));


@@ 273,7 273,7 @@ namespace sdesktop::endpoints
        case 18:
            return bsp::KeyCodes::SSwitchMid;
        default:
            LOG_ERROR("invalid keycode");
            LOG_ERROR("Invalid keycode");
            return bsp::KeyCodes::Undefined;
        };
    }

M module-services/service-desktop/endpoints/developerMode/Mode/UI_Helper.cpp => module-services/service-desktop/endpoints/developerMode/Mode/UI_Helper.cpp +1 -1
@@ 12,7 12,7 @@ namespace sdesktop::endpoints
{
    void UI_Helper::preProcess(http::Method method, Context &context)
    {
        LOG_INFO("In UI helper - requesting %d", static_cast<int>(method));
        LOG_INFO("In UI helper: requesting %s", magic_enum::enum_name(method).data());
    }

    class UIEvent : public sdesktop::Event

M module-services/service-desktop/endpoints/deviceInfo/DeviceInfoEndpointCommon.cpp => module-services/service-desktop/endpoints/deviceInfo/DeviceInfoEndpointCommon.cpp +1 -1
@@ 31,7 31,7 @@ namespace sdesktop::endpoints
            const auto diagFileType = parseDiagnosticFileType(requestBody[json::fileList]);

            if (!magic_enum::enum_contains<DiagnosticFileType>(diagFileType)) {
                LOG_ERROR("Bad diagnostic type %d requested", static_cast<unsigned>(diagFileType));
                LOG_ERROR("Bad diagnostic type '%s' requested", magic_enum::enum_name(diagFileType).data());
                return http::Code::BadRequest;
            }


M module-services/service-desktop/endpoints/filesystem/FS_Helper.cpp => module-services/service-desktop/endpoints/filesystem/FS_Helper.cpp +3 -11
@@ 50,7 50,6 @@ namespace sdesktop::endpoints

    auto FS_Helper::processGet(Context &context) -> ProcessResult
    {
        LOG_DEBUG("Handling GET");
        const auto &body = context.getBody();
        ResponseContext response{};



@@ 74,7 73,6 @@ namespace sdesktop::endpoints

    auto FS_Helper::processPut(Context &context) -> ProcessResult
    {
        LOG_DEBUG("Handling PUT");
        const auto &body = context.getBody();
        auto code        = http::Code::BadRequest;
        ResponseContext response{};


@@ 103,7 101,6 @@ namespace sdesktop::endpoints

    auto FS_Helper::processDelete(Context &context) -> ProcessResult
    {
        LOG_DEBUG("Handling DEL");
        const auto &body = context.getBody();
        auto code        = http::Code::BadRequest;



@@ 191,7 188,7 @@ namespace sdesktop::endpoints
            dataWithCrc32 = fileOps.getDataForReceiveID(rxID, chunkNo);
        }
        catch (std::exception &e) {
            LOG_ERROR("%s", e.what());
            LOG_ERROR("Exception during getting data: %s", e.what());

            json11::Json::object response({{json::reason, e.what()}});
            return ResponseContext{.status = http::Code::BadRequest, .body = response};


@@ 233,7 230,7 @@ namespace sdesktop::endpoints
        LOG_DEBUG("Start sending of file: %s", filePath.c_str());

        if (fileSize == 0 || fileCrc32.empty()) {
            LOG_ERROR("File %s corrupted", filePath.c_str());
            LOG_ERROR("File '%s' corrupted", filePath.c_str());

            return ResponseContext{.status = code};
        }


@@ 248,8 245,6 @@ namespace sdesktop::endpoints

        if (!std::filesystem::exists(filePath)) {
            LOG_DEBUG("Creating file %s", filePath.c_str());

            code = http::Code::Created;
        }
        else {
            LOG_DEBUG("Overwriting file %s", filePath.c_str());


@@ 304,8 299,7 @@ namespace sdesktop::endpoints
            returnCode = fileOps.sendDataForTransmitID(txID, chunkNo, data);
        }
        catch (std::exception &e) {
            LOG_ERROR("%s", e.what());

            LOG_ERROR("Exception during sending data: %s", e.what());
            auto code     = http::Code::NotAcceptable;
            auto response = json11::Json::object({{json::reason, e.what()}});



@@ 320,8 314,6 @@ namespace sdesktop::endpoints
                {{json::fs::txID, static_cast<int>(txID)}, {json::fs::chunkNo, static_cast<int>(chunkNo)}});
        }
        else {
            LOG_ERROR("FileOperations::sendDataForTransmitID failed");

            code     = http::Code::BadRequest;
            response = json11::Json::object(
                {{json::fs::txID, static_cast<int>(txID)}, {json::fs::chunkNo, static_cast<int>(chunkNo)}});

M module-services/service-desktop/endpoints/filesystem/FileContext.cpp => module-services/service-desktop/endpoints/filesystem/FileContext.cpp +2 -2
@@ 106,7 106,7 @@ auto FileReadContext::read() -> std::vector<std::uint8_t>
    advanceFileOffset(dataLeft);

    if (reachedEOF()) {
        LOG_INFO("Reached EOF");
        LOG_DEBUG("Reached EOF");
    }

    return buffer;


@@ 134,7 134,7 @@ auto FileWriteContext::write(const std::vector<std::uint8_t> &data) -> void
    advanceFileOffset(dataLeft);

    if (reachedEOF()) {
        LOG_INFO("Reached EOF of %s", path.c_str());
        LOG_DEBUG("Reached EOF of %s", path.c_str());
    }
}


M module-services/service-desktop/endpoints/filesystem/FileOperations.cpp => module-services/service-desktop/endpoints/filesystem/FileOperations.cpp +3 -3
@@ 156,7 156,7 @@ auto FileOperations::getDataForReceiveID(transfer_id rxID, std::uint32_t chunkNo
    }

    if (fileCtx->reachedEOF()) {
        LOG_INFO("Reached EOF for rxID %u", static_cast<unsigned>(rxID));
        LOG_DEBUG("Reached EOF for rxID %u", static_cast<unsigned>(rxID));
        fileCrc32 = fileCtx->fileHash();
        writeTransfers.erase(rxID);
    }


@@ 208,7 208,7 @@ auto FileOperations::sendDataForTransmitID(transfer_id txID, std::uint32_t chunk
    fileCtx->write(*fileData);

    if (fileCtx->reachedEOF()) {
        LOG_INFO("Reached EOF for txID %u", static_cast<unsigned>(txID));
        LOG_DEBUG("Reached EOF for txID %u", static_cast<unsigned>(txID));
        auto fileOK = fileCtx->crc32Matches();

        if (!fileOK) {


@@ 232,7 232,7 @@ auto FileOperations::cleanUpUndeliveredTransfers() -> void
        return;
    }

    LOG_INFO("Clean up after undelivered transfers");
    LOG_DEBUG("Clean up after undelivered transfers");
    for (auto &wt : writeTransfers) {
        wt.second->removeFile();
        wt.second.reset();

M module-services/service-desktop/endpoints/update/UpdateHelper.cpp => module-services/service-desktop/endpoints/update/UpdateHelper.cpp +2 -2
@@ 94,7 94,7 @@ namespace sdesktop::endpoints
    bool removeDirectory(const std::filesystem::path &path)
    {
        if (std::filesystem::is_directory(path)) {
            LOG_INFO("'%s' exists, removing", path.c_str());
            LOG_INFO("Removing directory: %s", path.c_str());
            std::error_code errorCode;
            if (std::filesystem::remove_all(path, errorCode) == 0) {
                return false;


@@ 167,7 167,7 @@ namespace sdesktop::endpoints

    void UpdateHelper::preProcess(http::Method method, [[maybe_unused]] Context &context)
    {
        LOG_INFO("In UpdateHelper - requesting %d", static_cast<int>(method));
        LOG_INFO("UpdateHelper requesting: %s", magic_enum::enum_name(method).data());
    }

    auto UpdateHelper::processPost(Context &context) -> ProcessResult

M module-services/service-desktop/parser/MessageHandler.cpp => module-services/service-desktop/parser/MessageHandler.cpp +2 -2
@@ 32,7 32,7 @@ namespace sdesktop::endpoints
    {
        auto context = ContextFactory::create(messageJson);

        LOG_DEBUG("[MsgHandler]\nmethod: %s\nendpoint: %s\nuuid: %d",
        LOG_DEBUG("Message details: method: %s, endpoint: %s, uuid: %d",
                  magic_enum::enum_name(context->getMethod()).data(),
                  magic_enum::enum_name(context->getEndpoint()).data(),
                  context->getUuid());


@@ 40,7 40,7 @@ namespace sdesktop::endpoints
        auto handler = endpointFactory->create(*context, OwnerServicePtr);

        if (handler == nullptr) {
            LOG_ERROR("No way to handle!");
            LOG_ERROR("Handler not created. Cannot proceed");
            return;
        }
        handler->handle(*context);

M module-services/service-desktop/parser/ParserFSM.cpp => module-services/service-desktop/parser/ParserFSM.cpp +1 -4
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "ParserFSM.hpp"


@@ 93,8 93,6 @@ namespace sdesktop::endpoints
            return;
        }

        LOG_DEBUG("Payload length: %lu", payloadLength);

        message::removeHeader(receivedMsg);
        parseNewMessage();
    }


@@ 110,7 108,6 @@ namespace sdesktop::endpoints
            LOG_DEBUG("Header: %s\n", header.c_str());
            payloadLength = message::calcPayloadLength(header);

            LOG_DEBUG("Payload length: %lu\n", payloadLength);
            message::eraseFront(receivedMsg, missingHeaderLength);

            parseNewMessage();

M module-services/service-eink/ServiceEink.cpp => module-services/service-eink/ServiceEink.cpp +3 -2
@@ 87,7 87,6 @@ namespace service::eink

    sys::ReturnCodes ServiceEink::InitHandler()
    {
        LOG_INFO("Initializing Eink");
        if (const auto status = display->reinitAndPowerOn(); status != hal::eink::EinkStatus::EinkOK) {
            LOG_FATAL("Error: Could not initialize Eink display!");
            return sys::ReturnCodes::Failure;


@@ 104,6 103,7 @@ namespace service::eink

        eInkSentinel->HoldMinimumFrequency();

        LOG_INFO("Initialized");
        return sys::ReturnCodes::Success;
    }



@@ 128,6 128,8 @@ namespace service::eink

        display->shutdown();
        settings->deinit();

        LOG_INFO("Deinitialized");
        return sys::ReturnCodes::Success;
    }



@@ 144,7 146,6 @@ namespace service::eink

    sys::ReturnCodes ServiceEink::SwitchPowerModeHandler(const sys::ServicePowerMode mode)
    {
        LOG_INFO("PowerModeHandler: %s", c_str(mode));
        switch (mode) {
        case sys::ServicePowerMode::Active:
            enterActiveMode();

M module-services/service-fileindexer/InotifyHandler.cpp => module-services/service-fileindexer/InotifyHandler.cpp +19 -13
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <service-fileindexer/InotifyHandler.hpp>


@@ 41,8 41,7 @@ namespace service::detail

    void InotifyHandler::registerMessageHandlers()
    {
        if (svc == nullptr) {
            LOG_ERROR("svc is nullptr");
        if (!isParentServiceInitialized()) {
            return;
        }
        svc->connect(typeid(purefs::fs::message::inotify), [&](sys::Message *request) -> sys::MessagePointer {


@@ 53,7 52,7 @@ namespace service::detail
    bool InotifyHandler::addWatch(std::string_view monitoredPath)
    {
        if (mfsNotifier == nullptr) {
            LOG_ERROR("mfsNotifier is nullptr");
            LOG_ERROR("Notifier not initialized");
            return false;
        }
        // Wait for close, delete move to or from location


@@ 142,15 141,14 @@ namespace service::detail
    // On update or create content
    void InotifyHandler::onUpdateOrCreate(std::string_view path)
    {
        LOG_DEBUG("onUpdateOrCreate: %s", std::string(path).c_str());
        if (svc == nullptr) {
            LOG_ERROR("svc is nullptr");
        LOG_DEBUG("Processing file: %s", std::string(path).c_str());
        if (!isParentServiceInitialized()) {
            return;
        }

        const auto extension = utils::stringToLowercase(fs::path(path).extension());
        if (!isExtSupported(extension)) {
            LOG_WARN("Not supported extension - %s", extension.c_str());
            LOG_WARN("Not supported extension: %s", extension.c_str());
            return;
        }



@@ 160,22 158,21 @@ namespace service::detail
            DBServiceAPI::GetQuery(svc.get(), db::Interface::Name::MultimediaFiles, std::move(query));
        }
        else {
            LOG_INFO("onUpdateOrCreate: skipped file");
            LOG_WARN("File corrupted, skipping.");
        }
    }

    // On remove content
    void InotifyHandler::onRemove(std::string_view path)
    {
        LOG_DEBUG("onRemove path: %s", std::string(path).c_str());
        if (svc == nullptr) {
            LOG_ERROR("svc is nullptr");
        LOG_DEBUG("Processing file: %s", std::string(path).c_str());
        if (!isParentServiceInitialized()) {
            return;
        }

        const auto extension = utils::stringToLowercase(fs::path(path).extension());
        if (!isExtSupported(extension)) {
            LOG_WARN("Not supported extension - %s", extension.c_str());
            LOG_WARN("Not supported extension: %s", extension.c_str());
            return;
        }



@@ 183,4 180,13 @@ namespace service::detail
        DBServiceAPI::GetQuery(svc.get(), db::Interface::Name::MultimediaFiles, std::move(query));
    }

    bool InotifyHandler::isParentServiceInitialized()
    {
        if (svc == nullptr) {
            LOG_ERROR("Parent service is nullptr, cannot proceed");
            return false;
        }
        return true;
    }

} // namespace service::detail

M module-services/service-fileindexer/ServiceFileIndexer.cpp => module-services/service-fileindexer/ServiceFileIndexer.cpp +2 -3
@@ 19,12 19,10 @@ namespace service
    ServiceFileIndexer::ServiceFileIndexer(const std::vector<std::string> &paths)
        : sys::Service{service::name::file_indexer, "", fileIndexerServiceStackSize}, mStartupIndexer{paths}
    {
        LOG_DEBUG("[%s] Initializing", service::name::file_indexer);
    }

    ServiceFileIndexer::~ServiceFileIndexer()
    {
        LOG_INFO("[%s] Cleaning resources", service::name::file_indexer);
    }

    sys::MessagePointer ServiceFileIndexer::DataReceivedHandler(sys::DataMessage *msgl, sys::ResponseMessage *resp)


@@ 43,12 41,13 @@ namespace service
            return sys::ReturnCodes::Success;
        }

        LOG_INFO("Initialized");
        return sys::ReturnCodes::Failure;
    }

    sys::ReturnCodes ServiceFileIndexer::DeinitHandler()
    {
        LOG_DEBUG("[%s] Deitializing", service::name::file_indexer);
        LOG_INFO("Deinitialized");
        return sys::ReturnCodes::Success;
    }


M module-services/service-fileindexer/StartupIndexer.cpp => module-services/service-fileindexer/StartupIndexer.cpp +3 -3
@@ 94,7 94,7 @@ namespace service::detail
        if (isDirectoryFullyTraversed(mSubDirIterator)) {
            if (mTopDirIterator == std::cend(directoriesToScan)) {
                createLockFile();
                LOG_INFO("Initial startup indexer - Finished ...");
                LOG_INFO("Initial startup indexer: Finished");
                mIdxTimer.stop();
                return;
            }


@@ 125,7 125,7 @@ namespace service::detail
    auto StartupIndexer::start(std::shared_ptr<sys::Service> svc, std::string_view svc_name) -> void
    {
        if (!hasLockFile()) {
            LOG_INFO("Initial startup indexer - Started...");
            LOG_INFO("Initial startup indexer: Started");

            auto query = std::make_unique<db::multimedia_files::query::RemoveAll>();
            DBServiceAPI::GetQuery(svc.get(), db::Interface::Name::MultimediaFiles, std::move(query));


@@ 135,7 135,7 @@ namespace service::detail
            mForceStop = false;
        }
        else {
            LOG_INFO("Initial startup indexer - Not needed...");
            LOG_INFO("Initial startup indexer: Not needed");
        }
    }


M module-services/service-fileindexer/include/service-fileindexer/InotifyHandler.hpp => module-services/service-fileindexer/include/service-fileindexer/InotifyHandler.hpp +3 -1
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 43,5 43,7 @@ namespace service::detail
        void onRemove(std::string_view path);

        sys::MessagePointer handleInotifyMessage(purefs::fs::message::inotify *inotify);

        bool isParentServiceInitialized();
    };
} // namespace service::detail

M module-services/service-gui/ServiceGUI.cpp => module-services/service-gui/ServiceGUI.cpp +4 -1
@@ 88,12 88,16 @@ namespace service::gui
        worker->init(queueInfo);
        worker->run();
        stateManager.setState(ServiceGUIState::Running);

        LOG_INFO("Initialized");
        return sys::ReturnCodes::Success;
    }

    sys::ReturnCodes ServiceGUI::DeinitHandler()
    {
        worker->close();

        LOG_INFO("Deinitialized");
        return sys::ReturnCodes::Success;
    }



@@ 116,7 120,6 @@ namespace service::gui

    sys::ReturnCodes ServiceGUI::SwitchPowerModeHandler(const sys::ServicePowerMode mode)
    {
        LOG_INFO("PowerModeHandler: %s", c_str(mode));
        return sys::ReturnCodes::Success;
    }


M module-services/service-test/ServiceTest.cpp => module-services/service-test/ServiceTest.cpp +4 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "service-test/ServiceTest.hpp"


@@ 14,7 14,6 @@ namespace service::test

    ServiceTest::ServiceTest() : sys::Service(service::name::service_test, "", stackSize)
    {
        LOG_INFO("[ServiceTest] Initializing");
    }

    sys::ReturnCodes ServiceTest::InitHandler()


@@ 50,11 49,14 @@ namespace service::test
                t.stop();
            });
        th.start();

        LOG_INFO("Initialized");
        return sys::ReturnCodes::Success;
    }

    sys::ReturnCodes ServiceTest::DeinitHandler()
    {
        LOG_INFO("Deinitialized");
        return sys::ReturnCodes::Success;
    }


M module-services/service-time/AlarmHandlerFactory.cpp => module-services/service-time/AlarmHandlerFactory.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <map>


@@ 14,7 14,7 @@ namespace alarms
        if (handlers.count(type) != 0u) {
            return handlers.at(type);
        }
        LOG_ERROR("no such alarm type handler defined: %d", static_cast<int>(type));
        LOG_ERROR("Alarm handler: %d is not defined", static_cast<int>(type));
        return nullptr;
    }


M module-services/service-time/ServiceTime.cpp => module-services/service-time/ServiceTime.cpp +4 -3
@@ 26,14 26,12 @@ namespace stm
                                                                         std::make_unique<RTCCommand>(this))},
          alarmOperationsFactory{std::move(alarmOperationsFactory)}
    {
        LOG_INFO("[ServiceTime] Initializing");
        bus.channels.push_back(sys::BusChannel::ServiceDBNotifications);
        bus.channels.push_back(sys::BusChannel::ServiceEvtmgrNotifications);
    }

    ServiceTime::~ServiceTime()
    {
        LOG_INFO("[ServiceTime] Cleaning resources");
    }

    sys::ReturnCodes ServiceTime::InitHandler()


@@ 67,18 65,21 @@ namespace stm
            [this]() { this->bus.sendUnicast(std::make_shared<SingleVibrationStart>(), service::name::audio); });
        alarmMessageHandler = std::make_unique<alarms::AlarmMessageHandler>(this, std::move(alarmOperations));
        registerMessageHandlers();

        LOG_INFO("Initialized");
        return sys::ReturnCodes::Success;
    }

    sys::ReturnCodes ServiceTime::DeinitHandler()
    {
        settings->deinit();

        LOG_INFO("Deinitialized");
        return sys::ReturnCodes::Success;
    }

    sys::ReturnCodes ServiceTime::SwitchPowerModeHandler(const sys::ServicePowerMode mode)
    {
        LOG_FATAL("[ServiceTime] PowerModeHandler: %s", c_str(mode));
        return sys::ReturnCodes::Success;
    }


M module-sys/Service/Service.cpp => module-sys/Service/Service.cpp +1 -1
@@ 76,7 76,7 @@ namespace sys
        bus.connect();
        enableRunLoop = true;
        if (!Start()) {
            LOG_FATAL("FATAL ERROR: Start service failed!:%s", GetName().c_str());
            LOG_FATAL("Start service failed!:%s", GetName().c_str());
            configASSERT(0);
        }
    }

M module-sys/SystemManager/PowerManager.cpp => module-sys/SystemManager/PowerManager.cpp +1 -1
@@ 205,7 205,7 @@ namespace sys
        const TickType_t periodTickIncrease = tickCount - lastLogStatisticsTimestamp;
        UpdateCpuFrequencyMonitor(lowPowerControl->GetCurrentFrequencyLevel());

        std::string log{"last period (total): "};
        std::string log{"Last period (total): "};
        for (auto &level : cpuFrequencyMonitor) {
            log.append(level.GetName() + ": " + std::to_string(level.GetPeriodRuntimePercentage(periodTickIncrease)) +
                       "% (" + std::to_string(level.GetTotalRuntimePercentage(tickCount)) + "%) ");

M module-sys/SystemManager/SystemManagerCommon.cpp => module-sys/SystemManager/SystemManagerCommon.cpp +10 -11
@@ 124,8 124,7 @@ namespace sys
        case SystemManagerCommon::State::Running:
        case SystemManagerCommon::State::Suspend:
        case SystemManagerCommon::State::Shutdown:
            LOG_FATAL("State changed after reset/shutdown was requested to: %s! this is terrible failure!",
                      c_str(state));
            LOG_FATAL("State changed after reset/shutdown was requested to: %s! Terrible failure!", c_str(state));
            break;
        }
    }


@@ 248,7 247,7 @@ namespace sys

    bool SystemManagerCommon::Restore(Service *s)
    {
        LOG_DEBUG("trying to enter restore state");
        LOG_DEBUG("Trying to enter restore state");
        auto ret = s->bus.sendUnicastSync(std::make_shared<SystemManagerCmd>(Code::Restore),
                                          service::name::system_manager,
                                          sys::constants::restoreTimeout);


@@ 365,7 364,7 @@ namespace sys
                ++service;
            }
            else {
                LOG_DEBUG("RequestServiceClose %s", (*service)->GetName().c_str());
                LOG_DEBUG("Request service to close: %s", (*service)->GetName().c_str());
                if (!RequestServiceClose((*service)->GetName(), this)) {
                    LOG_ERROR("Service %s did not respond -> to kill", (*service)->GetName().c_str());
                    kill(*service);


@@ 458,10 457,10 @@ namespace sys

            const auto message = static_cast<ReadyToCloseMessage *>(msg);
            if (std::find(servicesToClose.begin(), servicesToClose.end(), message->sender) == servicesToClose.end()) {
                LOG_ERROR("%s is not on the list. Further processing skipped.", message->sender.c_str());
                LOG_ERROR("Service '%s' is not on the list. Further processing skipped.", message->sender.c_str());
                return;
            }
            LOG_INFO("ready to close %s", message->sender.c_str());
            LOG_INFO("Ready to close %s", message->sender.c_str());
            servicesToClose.erase(std::remove(servicesToClose.begin(), servicesToClose.end(), message->sender),
                                  servicesToClose.end());



@@ 524,7 523,7 @@ namespace sys
    {
        auto ret = toKill->DeinitHandler();
        if (ret != sys::ReturnCodes::Success) {
            LOG_DEBUG("deinit handler: %s", c_str(ret));
            LOG_DEBUG("Deinit handler status: %s", c_str(ret));
        }
        toKill->CloseHandler();
    }


@@ 572,14 571,14 @@ namespace sys
         * state. */
        connect(sevm::KbdMessage(), [&](Message *) {
            if (state == State::Shutdown) {
                LOG_INFO("Rebooting phone after shutdown with USB connected...");
                LOG_INFO("Rebooting phone after shutdown with USB connected");
                set(State::Reboot);
            }
            return MessageNone{};
        });

        connect(sevm::BatteryBrownoutMessage(), [&](Message *) {
            LOG_INFO("Battery Brownout voltage level reached! Closing system...");
            LOG_INFO("Battery Brownout voltage level reached! Closing system");
            CloseSystemHandler(CloseReason::SystemBrownout);
            return MessageNone{};
        });


@@ 672,7 671,7 @@ namespace sys

    void SystemManagerCommon::CloseSystemHandler(CloseReason closeReason)
    {
        LOG_DEBUG("Invoking closing procedure...");
        LOG_DEBUG("Invoking closing procedure");

        cpuSentinel->HoldMinimumFrequency(bsp::CpuFrequencyMHz::Level_6);



@@ 733,7 732,7 @@ namespace sys

        DestroyServices(getWhiteListFor(WhiteListType::Restore));

        LOG_INFO("entered restore state");
        LOG_INFO("Entered restore state");
    }

    void SystemManagerCommon::RebootHandler()

M module-sys/SystemWatchdog/SystemWatchdog.cpp => module-sys/SystemWatchdog/SystemWatchdog.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <SystemWatchdog/SystemWatchdog.hpp>


@@ 66,7 66,7 @@ namespace sys
            if (Ticks::GetTicks() - lastRefreshTimestamp >= refreshTimeoutPeriod) {
                // Allow HW watchdog timeout to occur
                timeout_occurred = true;
                LOG_FATAL("!!! System watchdog timeout, system will be resetted soon !!!");
                LOG_FATAL("System watchdog timeout, system will be reset soon!");
            }
            else {
                bsp::watchdog::refresh();

M module-utils/log/Logger.cpp => module-utils/log/Logger.cpp +2 -2
@@ 316,15 316,15 @@ namespace Log
        bufferSizeLeft = lineBufferSizeLeft();
        bytesParsed    = snprintf(&lineBuffer[lineBufferCurrentPos],
                               bufferSizeLeft,
                               "%s%-5s %s[%s] %s%s:%s:%d:%s ",
                               "%s%-5s %s[%s] %s%s:%d:%s:%s ",
                               logColors->levelColors[level].data(),
                               levelNames[level],
                               logColors->serviceNameColor.data(),
                               getTaskDesc(),
                               logColors->callerInfoColor.data(),
                               file,
                               function,
                               line,
                               function,
                               logColors->resetColor.data());
        if (bytesParsed >= 0) {
            lineBufferCurrentPos += std::min(bufferSizeLeft, static_cast<std::size_t>(bytesParsed));

M module-utils/time/time/time_conversion.cpp => module-utils/time/time/time_conversion.cpp +1 -1
@@ 327,7 327,7 @@ namespace utils::time
        seconds   = (this->duration % secondsInHour) % secondsInMinute;

        if (verboseConversion) {
            LOG_DEBUG("duration %" PRIu64 " - %lu hours %lu minutes %lu seconds",
            LOG_DEBUG("Duration %" PRIu64 " - %lu hours %lu minutes %lu seconds",
                      static_cast<std::uint64_t>(duration),
                      hours,
                      minutes,

M module-utils/time/time/time_date_validation.cpp => module-utils/time/time/time_date_validation.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

/*


@@ 67,7 67,7 @@ namespace utils
                m = std::stoi(minute);
            }
            catch (std::exception &e) {
                LOG_INFO("validateTime exception");
                LOG_ERROR("Time validate exception");
                return false;
            }
            return validateTime(h, m, mode12h);

M module-utils/unicode/utf8/utf8/UTF8.cpp => module-utils/unicode/utf8/utf8/UTF8.cpp +8 -8
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <cassert>


@@ 412,7 412,7 @@ uint32_t UTF8::find(const char *s, uint32_t pos) const
    getStreamLength(s, stringSize, stringCount);

    if ((stringCount == 0) && (s[0] != 0)) {
        LOG_ERROR("corrupted string");
        LOG_ERROR("Corrupted string");
        return npos;
    }



@@ 445,7 445,7 @@ uint32_t UTF8::findLast(const char *s, uint32_t pos) const
    getStreamLength(s, stringSize, stringCount);
    // check input substring
    if ((stringCount == 0) && (s[0] != 0)) {
        LOG_ERROR("corrupted string");
        LOG_ERROR("Corrupted string");
        return npos;
    }
    // check if pos is in range of source string


@@ 639,14 639,14 @@ bool UTF8::insert(const char *ch, const uint32_t &index)
              *(ch + 3));

    if (ch_len == 0) {
        LOG_FATAL("not UTF8 character insert failed");
        LOG_FATAL("Not UTF8 character insert failed");
        return false;
    }

    // if there is not enough space in string buffer try to expand it by default expansion size.
    if (ch_len + sizeUsed >= sizeAllocated) {
        if (expand() == false) {
            LOG_FATAL("expand");
            LOG_FATAL("Expand string buffer failed");
            return false;
        }
    }


@@ 740,7 740,7 @@ uint32_t UTF8::decode(const char *utf8_char, uint32_t &length)
            len = 2;
        }
        else {
            LOG_ERROR("wrong utf8 char");
            LOG_ERROR("Wrong utf8 char");
            return ret;
        }
    }


@@ 756,7 756,7 @@ uint32_t UTF8::decode(const char *utf8_char, uint32_t &length)
            len = 3;
        }
        else {
            LOG_ERROR("wrong utf8 char");
            LOG_ERROR("Wrong utf8 char");
            return ret;
        }
    }


@@ 775,7 775,7 @@ uint32_t UTF8::decode(const char *utf8_char, uint32_t &length)
            len = 4;
        }
        else {
            LOG_ERROR("wrong utf8 char");
            LOG_ERROR("Wrong utf8 char");
            return ret;
        }
    }

M module-utils/utility/Utils.hpp => module-utils/utility/Utils.hpp +2 -2
@@ 248,7 248,7 @@ namespace utils
            value = std::stoi(text);
        }
        catch (const std::exception &e) {
            LOG_ERROR("toNumeric exception %s", e.what());
            LOG_ERROR("To numeric exception %s", e.what());
            return false;
        }
        return true;


@@ 260,7 260,7 @@ namespace utils
            return std::stoi(text);
        }
        catch (const std::exception &e) {
            LOG_ERROR("toNumeric exception %s", e.what());
            LOG_ERROR("To numeric exception %s", e.what());
            return 0;
        }
    }

M module-vfs/drivers/src/thirdparty/fatfs/ff_glue.cpp => module-vfs/drivers/src/thirdparty/fatfs/ff_glue.cpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
// ffFAT glue layer code



@@ 119,7 119,7 @@ namespace purefs::fs::drivers::ffat::internal
            }
            const auto res = diskmm->read(diskh, buff, sector, count);
            if (res < 0) {
                LOG_ERROR("write error %i", res);
                LOG_ERROR("Read error %i", res);
                return (res == -ERANGE) ? (RES_PARERR) : (RES_ERROR);
            }
            else {


@@ 139,7 139,7 @@ namespace purefs::fs::drivers::ffat::internal
            }
            const auto res = diskmm->write(diskh, buff, sector, count);
            if (res < 0) {
                LOG_ERROR("write error %i", res);
                LOG_ERROR("Write error %i", res);
                return (res == -ERANGE) ? (RES_PARERR) : (RES_ERROR);
            }
            else {

M module-vfs/src/purefs/blkdev/disk_handle.cpp => module-vfs/src/purefs/blkdev/disk_handle.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include <purefs/blkdev/disk_handle.hpp>
#include <purefs/blkdev/disk.hpp>


@@ 20,7 20,7 @@ namespace purefs::blkdev::internal
                }
            }
            else {
                LOG_ERROR("Unable to get sector count.");
                LOG_FATAL("Disk handle pointer expired.");
            }
        }
        return m_sectors;

M module-vfs/src/purefs/blkdev/partition_parser.cpp => module-vfs/src/purefs/blkdev/partition_parser.cpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <purefs/blkdev/partition_parser.hpp>


@@ 153,7 153,7 @@ namespace purefs::blkdev::internal
        int error{};
        while (try_count--) {
            if (sector_in_buf != current_sector) {
                LOG_INFO("extended parse: Read sector %u\n", unsigned(current_sector));
                LOG_INFO("Read sector %u\n", unsigned(current_sector));
                error = m_disk->read(sect_buf.data(), current_sector, 1, 0);
                if (error < 0)
                    break;


@@ 163,7 163,7 @@ namespace purefs::blkdev::internal
                const auto b1 = sect_buf[defs::mbr_signature_offs];
                const auto b2 = sect_buf[defs::mbr_signature_offs + 1];
                if (b1 != 0x55 || b2 != 0xAA) {
                    LOG_ERROR("extended_parse: No signature %02x,%02x", b1, b2);
                    LOG_ERROR("No signature %02x,%02x", b1, b2);
                    break;
                }
            }

M products/BellHybrid/BellHybridMain.cpp => products/BellHybrid/BellHybridMain.cpp +2 -2
@@ 99,7 99,7 @@ int main()
                platform->init();
            }
            catch (const std::runtime_error &e) {
                LOG_FATAL("%s", e.what());
                LOG_FATAL("Exception during platform initialization: %s", e.what());
                abort();
            }



@@ 135,7 135,7 @@ int main()
                platform->deinit();
            }
            catch (const std::runtime_error &e) {
                LOG_FATAL("%s", e.what());
                LOG_FATAL("Exception during platform deinit: %s", e.what());
                abort();
            }
            sys::SystemWatchdog::getInstance().deinit();

M products/BellHybrid/apps/Application.cpp => products/BellHybrid/apps/Application.cpp +1 -1
@@ 32,7 32,7 @@ namespace app
                        (isCurrentWindow(gui::popup::resolveWindowName(gui::popup::ID::PowerOff))) ||
                        (isCurrentWindow(gui::BellTurnOffWindow::name)));
            if (val == true) {
                LOG_ERROR("block popup - as curent window is in higher order popup");
                LOG_ERROR("Block popup - as curent window is in higher order popup");
            }
            return val ? gui::popup::FilterType::Ignore : gui::popup::FilterType::Show;
        });

M products/BellHybrid/apps/application-bell-main/presenters/HomeScreenPresenter.cpp => products/BellHybrid/apps/application-bell-main/presenters/HomeScreenPresenter.cpp +1 -1
@@ 254,7 254,7 @@ namespace app::home_screen
    {
        const auto greetingCollection = utils::translate_array("app_bell_greeting_msg");
        if (greetingCollection.empty()) {
            LOG_WARN("app_bell_greeting_msg array does not exist, using default string");
            LOG_WARN("Array 'app_bell_greeting_msg' does not exist, using default string");
            return "app_bell_greeting_msg";
        }


M products/BellHybrid/apps/application-bell-main/windows/BellMainSetHour.cpp => products/BellHybrid/apps/application-bell-main/windows/BellMainSetHour.cpp +1 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "BellMainSetHour.hpp"


@@ 69,7 69,6 @@ namespace gui

    bool BellMainSetHour::onInput(const InputEvent &inputEvent)
    {
        LOG_INFO("Bell Main Window Input");
        if (inputEvent.isShortRelease()) {
            switch (inputEvent.getKeyCode()) {
            case KeyCode::KEY_RF:

M products/BellHybrid/apps/common/src/AudioModel.cpp => products/BellHybrid/apps/common/src/AudioModel.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "models/AudioModel.hpp"


@@ 44,7 44,7 @@ namespace
            if (auto resp = std::dynamic_pointer_cast<service::AudioResponseMessage>(ret.second)) {
                return resp;
            }
            LOG_ERROR("msgType %d - not AudioResponseMessage", msgType);
            LOG_ERROR("Message type [%d] - not AudioResponseMessage", msgType);
            return std::make_shared<service::AudioResponseMessage>(audio::RetCode::Failed);
        }
        LOG_ERROR("Command %d Failed with %d error", msgType, static_cast<int>(ret.first));

M products/BellHybrid/services/audio/ServiceAudio.cpp => products/BellHybrid/services/audio/ServiceAudio.cpp +2 -3
@@ 64,7 64,6 @@ namespace service
          cpuSentinel(std::make_shared<sys::CpuSentinel>(audioServiceName, this)),
          settingsProvider(std::make_unique<settings::Settings>())
    {
        LOG_INFO("[%s] Initializing", audioServiceName);
        bus.channels.push_back(sys::BusChannel::ServiceAudioNotifications);

        auto sentinelRegistrationMsg = std::make_shared<sys::SentinelRegistrationMessage>(cpuSentinel);


@@ 103,7 102,6 @@ namespace service
    }
    Audio::~Audio()
    {
        LOG_INFO("[%s] Cleaning resources", audioServiceName);
    }
    sys::MessagePointer Audio::DataReceivedHandler(sys::DataMessage *msgl, sys::ResponseMessage *resp)
    {


@@ 113,11 111,12 @@ namespace service
    {
        settingsProvider->init(service::ServiceProxy(weak_from_this()));
        initializeDatabase();

        LOG_INFO("Initialized");
        return sys::ReturnCodes::Success;
    }
    sys::ReturnCodes Audio::DeinitHandler()
    {
        LOG_INFO("Deinitialized");
        return sys::ReturnCodes::Success;
    }
    void Audio::ProcessCloseReason([[maybe_unused]] sys::CloseReason closeReason)

M products/BellHybrid/services/desktop/endpoints/EndpointFactoryBell.cpp => products/BellHybrid/services/desktop/endpoints/EndpointFactoryBell.cpp +1 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "EndpointFactoryBell.hpp"


@@ 20,7 20,6 @@ namespace sdesktop::endpoints

    std::unique_ptr<Endpoint> EndpointFactoryBell::create(Context &context, sys::Service *ownerServicePtr)
    {
        LOG_DEBUG("Creating endpoint: %s", magic_enum::enum_name(context.getEndpoint()).data());
        switch (context.getEndpoint()) {
        case EndpointType::update:
            return std::make_unique<UpdateEndpoint>(ownerServicePtr);

M products/BellHybrid/services/time/AlarmOperations.cpp => products/BellHybrid/services/time/AlarmOperations.cpp +1 -1
@@ 69,7 69,7 @@ namespace alarms
                        std::stoi(settings.getValue(bell::settings::Bedtime::active, settings::SettingsScope::Global));
                }
                catch (const std::exception &e) {
                    LOG_ERROR("BedtimeSettingsProviderImpl active db record not valid! err: %s", e.what());
                    LOG_ERROR("Active db record not valid! err: %s", e.what());
                }
                return enabled;
            }

M products/PurePhone/PurePhoneMain.cpp => products/PurePhone/PurePhoneMain.cpp +3 -3
@@ 192,7 192,7 @@ int main()
                platform->init();
            }
            catch (const std::runtime_error &e) {
                LOG_FATAL("%s", e.what());
                LOG_FATAL("Exception during platform init: %s", e.what());
                abort();
            }



@@ 272,7 272,7 @@ int main()
                platform->deinit();
            }
            catch (const std::runtime_error &e) {
                LOG_FATAL("%s", e.what());
                LOG_FATAL("Exception during platform deinit: %s", e.what());
                abort();
            }
            sys::SystemWatchdog::getInstance().deinit();


@@ 280,7 280,7 @@ int main()
        });

    LOG_INFO("Launching %s ", ApplicationName);
    LOG_INFO("commit: %s version: %s branch: %s", GIT_REV, VERSION, GIT_BRANCH);
    LOG_INFO("Commit: %s version: %s branch: %s", GIT_REV, VERSION, GIT_BRANCH);
    cpp_freertos::Thread::StartScheduler();
    LOG_INFO("Scheduler is terminated properly");


M products/PurePhone/alarms/src/actions/PlayAudioActions.cpp => products/PurePhone/alarms/src/actions/PlayAudioActions.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "PlayAudioActions.hpp"


@@ 57,7 57,7 @@ namespace alarms
    bool PlayToneAction::execute(const AlarmEventRecord &record)
    {
        const auto tonePath = std::filesystem::path{record.musicTone};
        LOG_DEBUG("play some music: %s", record.musicTone.c_str());
        LOG_DEBUG("Play some music: %s", record.musicTone.c_str());
        return play(tonePath);
    }
} // namespace alarms

M products/PurePhone/services/appmgr/ApplicationManager.cpp => products/PurePhone/services/appmgr/ApplicationManager.cpp +1 -1
@@ 578,7 578,7 @@ namespace app::manager
    {
        if (not ApplicationManagerCommon::startApplication(app)) {
            if (ApplicationManagerCommon::isApplicationStarting(app)) {
                LOG_INFO("%s is starting already...", app.name().c_str());
                LOG_INFO("%s is starting already", app.name().c_str());
                return false;
            }


M products/PurePhone/services/db/ServiceDB.cpp => products/PurePhone/services/db/ServiceDB.cpp +1 -1
@@ 37,7 37,7 @@ ServiceDB::~ServiceDB()
    multimediaFilesDB.reset();

    Database::deinitialize();
    LOG_INFO("[ServiceDB] Cleaning resources");
    LOG_INFO("Cleaning resources");
}

db::Interface *ServiceDB::getInterface(db::Interface::Name interface)

M products/PurePhone/services/desktop/endpoints/EndpointFactoryPure.cpp => products/PurePhone/services/desktop/endpoints/EndpointFactoryPure.cpp +1 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "EndpointFactoryPure.hpp"


@@ 23,7 23,6 @@ namespace sdesktop::endpoints

    std::unique_ptr<Endpoint> EndpointFactoryPure::constructEndpoint(Context &context, sys::Service *ownerServicePtr)
    {
        LOG_DEBUG("Creating endpoint: %d", static_cast<int>(context.getEndpoint()));
        switch (context.getEndpoint()) {
        case EndpointType::update:
            return std::make_unique<UpdateEndpoint>(ownerServicePtr);

M products/PurePhone/services/desktop/endpoints/contacts/ContactHelper.cpp => products/PurePhone/services/desktop/endpoints/contacts/ContactHelper.cpp +1 -1
@@ 126,7 126,7 @@ namespace sdesktop::endpoints
            DBServiceAPI::GetQuery(ownerServicePtr, db::Interface::Name::Contact, std::move(query));
        }
        catch (const std::exception &e) {
            LOG_ERROR("exception while requesting data from DB");
            LOG_ERROR("Exception while requesting data from DB");
            return sys::ReturnCodes::Failure;
        }


M products/PurePhone/services/desktop/endpoints/messages/MessageHelper.cpp => products/PurePhone/services/desktop/endpoints/messages/MessageHelper.cpp +4 -4
@@ 555,7 555,7 @@ namespace sdesktop::endpoints
            DBServiceAPI::GetQuery(ownerServicePtr, db::Interface::Name::SMSThread, std::move(query));
        }
        catch (const std::bad_cast &e) {
            LOG_ERROR("exception while requesting thread");
            LOG_ERROR("Exception while requesting thread");
            return sys::ReturnCodes::Failure;
        }
        return sys::ReturnCodes::Success;


@@ 642,7 642,7 @@ namespace sdesktop::endpoints
            DBServiceAPI::GetQuery(ownerServicePtr, db::Interface::Name::SMS, std::move(query));
        }
        catch (const std::bad_cast &e) {
            LOG_ERROR("exception while getting message by thread ID");
            LOG_ERROR("Exception while getting message by thread ID");
            return sys::ReturnCodes::Failure;
        }
        return sys::ReturnCodes::Success;


@@ 721,7 721,7 @@ namespace sdesktop::endpoints
            DBServiceAPI::GetQuery(ownerServicePtr, db::Interface::Name::SMS, std::move(query));
        }
        catch (const std::bad_cast &e) {
            LOG_ERROR("exception while getting message");
            LOG_ERROR("Exception while getting message");
            return sys::ReturnCodes::Failure;
        }
        return sys::ReturnCodes::Success;


@@ 809,7 809,7 @@ namespace sdesktop::endpoints
            DBServiceAPI::GetQuery(ownerServicePtr, db::Interface::Name::SMSTemplate, std::move(query));
        }
        catch (const std::bad_cast &e) {
            LOG_ERROR("exception while getting messages template");
            LOG_ERROR("Exception while getting messages template");
            return sys::ReturnCodes::Failure;
        }
        return sys::ReturnCodes::Success;

M products/PurePhone/services/evtmgr/WorkerEvent.cpp => products/PurePhone/services/evtmgr/WorkerEvent.cpp +1 -1
@@ 144,7 144,7 @@ void WorkerEvent::requestSliderPositionRead()
void WorkerEvent::handleMagnetometerEvent()
{
    if (const auto &key = bsp::magnetometer::WorkerEventHandler(); key.has_value()) {
        LOG_DEBUG("magneto IRQ handler: %s", c_str(*key));
        LOG_DEBUG("Magnetometer IRQ handler: %s", c_str(*key));
        processKeyEvent(bsp::KeyEvents::Moved, *key);
    }
}