~aleteoryx/muditaos

fe708cdf31392bc009227c63ceb091ac450d6a78 — Adam Wulkiewicz 3 years ago 2de71a0
[MOS-670] Change clang-format AlwaysBreakTemplateDeclarations to Yes

Add --all and --fix-all options to style-check-hook
303 files changed, 1099 insertions(+), 884 deletions(-)

M .clang-format
M board/linux/libiosyscalls/src/iosyscalls-internal.hpp
M board/rt1051/memwrap.c
M config/clang/clang-common.sh
M config/clang_check.sh
M config/format-config.sh
M config/style_check_hook.sh
M host-tools/genlittlefs/lfs_ioaccess.c
M host-tools/genlittlefs/mklfs.c
M module-apps/application-alarm-clock/ApplicationAlarmClock.hpp
M module-apps/application-alarm-clock/data/AlarmsData.hpp
M module-apps/application-alarm-clock/models/AlarmsRepository.cpp
M module-apps/application-alarm-clock/widgets/AlarmClockStyle.hpp
M module-apps/application-alarm-clock/widgets/AlarmRRuleOptionsItem.hpp
M module-apps/application-alarm-clock/widgets/AlarmTimeItem.cpp
M module-apps/application-alarm-clock/widgets/AlarmTimeItem.hpp
M module-apps/application-alarm-clock/windows/AlarmClockMainWindow.cpp
M module-apps/application-alarm-clock/windows/AlarmClockMainWindow.hpp
M module-apps/application-antenna/include/application-antenna/ApplicationAntenna.hpp
M module-apps/application-antenna/windows/AntennaMainWindow.hpp
M module-apps/application-calculator/include/application-calculator/ApplicationCalculator.hpp
M module-apps/application-calculator/widgets/CalculatorStyle.hpp
M module-apps/application-calendar/include/application-calendar/ApplicationCalendar.hpp
M module-apps/application-calendar/widgets/DayLabel.cpp
M module-apps/application-calendar/windows/CalendarMainWindow.cpp
M module-apps/application-calendar/windows/CalendarMainWindow.hpp
M module-apps/application-call/include/application-call/ApplicationCall.hpp
M module-apps/application-call/model/CallModel.hpp
M module-apps/application-call/widgets/StateIcon.hpp
M module-apps/application-call/windows/CallWindow.cpp
M module-apps/application-call/windows/CallWindow.hpp
M module-apps/application-calllog/data/CallLogInternals.hpp
M module-apps/application-calllog/include/application-calllog/ApplicationCallLog.hpp
M module-apps/application-calllog/widgets/CalllogItem.hpp
M module-apps/application-desktop/include/application-desktop/ApplicationDesktop.hpp
M module-apps/application-desktop/widgets/DesktopInputWidget.cpp
M module-apps/application-desktop/widgets/DesktopInputWidget.hpp
M module-apps/application-desktop/windows/Reboot.cpp
M module-apps/application-meditation/data/Style.hpp
M module-apps/application-meditation/include/application-meditation/ApplicationMeditation.hpp
M module-apps/application-meditation/windows/MeditationWindow.hpp
M module-apps/application-messages/data/MessagesStyle.hpp
M module-apps/application-messages/include/application-messages/ApplicationMessages.hpp
M module-apps/application-messages/widgets/SMSInputWidget.hpp
M module-apps/application-messages/windows/NewMessage.cpp
M module-apps/application-music-player/include/application-music-player/ApplicationMusicPlayer.hpp
M module-apps/application-music-player/widgets/SongItem.hpp
M module-apps/application-notes/include/application-notes/ApplicationNotes.hpp
M module-apps/application-notes/model/NotesListModel.hpp
M module-apps/application-notes/presenter/SearchEngineWindowPresenter.hpp
M module-apps/application-notes/windows/NoteMainWindow.hpp
M module-apps/application-onboarding/ApplicationOnBoarding.hpp
M module-apps/application-onboarding/data/OnBoardingSwitchData.hpp
M module-apps/application-onboarding/model/EULARepository.cpp
M module-apps/application-onboarding/windows/OnBoardingLanguagesWindow.hpp
M module-apps/application-onboarding/windows/StartConfigurationWindow.hpp
M module-apps/application-phonebook/include/application-phonebook/ApplicationPhonebook.hpp
M module-apps/application-phonebook/models/NewContactModel.hpp
M module-apps/application-phonebook/widgets/ContactFlagsStyle.hpp
M module-apps/application-phonebook/widgets/InputBoxWithLabelAndIconWidget.hpp
M module-apps/application-settings/ApplicationSettings.cpp
M module-apps/application-settings/include/application-settings/ApplicationSettings.hpp
M module-apps/application-settings/presenter/system/TechnicalWindowPresenter.hpp
M module-apps/application-settings/widgets/SettingsStyle.hpp
M module-apps/application-settings/widgets/display-keypad/CategoryWidget.hpp
M module-apps/application-settings/widgets/display-keypad/QuoteWidget.hpp
M module-apps/application-settings/windows/WindowNames.hpp
M module-apps/application-settings/windows/advanced/CPUModeTestWindow.cpp
M module-apps/application-settings/windows/bluetooth/BluetoothWindow.hpp
M module-apps/application-settings/windows/display-keypad/KeypadLightWindow.cpp
M module-apps/application-settings/windows/display-keypad/KeypadLightWindow.hpp
M module-apps/application-settings/windows/security/AutolockWindow.cpp
M module-apps/application-special-input/include/application-special-input/ApplicationSpecialInput.hpp
M module-apps/application-special-input/widgets/SpecialInputTableWidget.hpp
M module-apps/application-test/include/application-test/ApplicationTest.hpp
M module-apps/apps-common/ApplicationCommon.hpp
M module-apps/apps-common/ApplicationCommonPopupBlueprints.cpp
M module-apps/apps-common/ApplicationLauncher.hpp
M module-apps/apps-common/BasePresenter.hpp
M module-apps/apps-common/DatabaseModel.hpp
M module-apps/apps-common/InternalModel.hpp
M module-apps/apps-common/audio/AbstractSoundsPlayer.hpp
M module-apps/apps-common/audio/SoundsPlayer.cpp
M module-apps/apps-common/locks/widgets/LockHash.hpp
M module-apps/apps-common/notifications/NotificationProvider.hpp
M module-apps/apps-common/notifications/NotificationsModel.cpp
M module-apps/apps-common/notifications/NotificationsModel.hpp
M module-apps/apps-common/options/OptionStyle.hpp
M module-apps/apps-common/options/OptionsList.cpp
M module-apps/apps-common/options/OptionsList.hpp
M module-apps/apps-common/popups/AlarmPopup.hpp
M module-apps/apps-common/popups/VolumeWindow.hpp
M module-apps/apps-common/popups/lock-popups/phone-lock-wallpapers/WallpaperBase.hpp
M module-apps/apps-common/popups/lock-popups/phone-lock-wallpapers/WallpaperClock.hpp
M module-apps/apps-common/popups/presenter/AlarmPresenter.cpp
M module-apps/apps-common/popups/presenter/AlarmPresenter.hpp
M module-apps/apps-common/popups/presenter/PowerOffPresenter.hpp
M module-apps/apps-common/popups/presenter/QuotesPresenter.cpp
M module-apps/apps-common/widgets/spinners/ItemSpinner.hpp
M module-apps/apps-common/widgets/spinners/Model.hpp
M module-apps/apps-common/widgets/spinners/Spinners.hpp
M module-apps/apps-common/widgets/spinners/StringOutputSpinner.hpp
M module-apps/apps-common/windows/Dialog.cpp
M module-apps/tests/widgets/test-DigitsContainer.cpp
M module-audio/Audio/Operation/IdleOperation.hpp
M module-audio/Audio/Operation/Operation.hpp
M module-audio/Audio/Stream.hpp
M module-audio/Audio/decoder/xing_header.h
M module-audio/Audio/encoder/EncoderWAV.hpp
M module-audio/Audio/transcode/BasicDecimator.hpp
M module-audio/Audio/transcode/BasicInterpolator.hpp
M module-audio/board/rt1051/puretx/PureTxAudioCodec.cpp
M module-bluetooth/Bluetooth/BluetoothWorker.cpp
M module-bluetooth/Bluetooth/BtKeysStorage.hpp
M module-bluetooth/Bluetooth/CommandHandler.hpp
M module-bluetooth/Bluetooth/Error.hpp
M module-bluetooth/Bluetooth/WorkerController.cpp
M module-bluetooth/Bluetooth/command/Command.cpp
M module-bluetooth/Bluetooth/interface/profiles/A2DP/A2DP.cpp
M module-bluetooth/Bluetooth/interface/profiles/A2DP/AVDTP.cpp
M module-bluetooth/Bluetooth/interface/profiles/A2DP/AVDTP.hpp
M module-bluetooth/Bluetooth/interface/profiles/A2DP/AVRCP.hpp
M module-bluetooth/Bluetooth/interface/profiles/GAP/GAP.cpp
M module-bluetooth/Bluetooth/interface/profiles/HFP/HFP.cpp
M module-bluetooth/Bluetooth/interface/profiles/HSP/HSP.cpp
M module-bluetooth/Bluetooth/interface/profiles/PhoneInterface.hpp
M module-bluetooth/Bluetooth/interface/profiles/ProfileManager.hpp
M module-bluetooth/Bluetooth/interface/profiles/SCO/ScoUtils.cpp
M module-bluetooth/tests/tests-StatefulController.cpp
M module-bsp/WorkerQueue.hpp
M module-bsp/board/linux/bluetooth/test/bsp_bt.cpp
M module-bsp/board/linux/bluetooth/test/bsp_bt.hpp
M module-bsp/board/linux/eeprom/eeprom.cpp
M module-bsp/board/linux/lpm/PowerProfile.cpp
M module-bsp/board/rt1051/bellpx/bsp/lpm/PowerProfile.cpp
M module-bsp/board/rt1051/bellpx/bsp/rotary_encoder/rotary_encoder.cpp
M module-bsp/board/rt1051/bsp/eink/ED028TC1.cpp
M module-bsp/board/rt1051/bsp/headset/headset.cpp
M module-bsp/board/rt1051/bsp/keypad_backlight/LP55281.hpp
M module-bsp/board/rt1051/bsp/light_sensor/LTR303ALS.hpp
M module-bsp/board/rt1051/puretx/bsp/battery_charger/battery_charger_utils.hpp
M module-bsp/board/rt1051/puretx/bsp/lpm/PowerProfile.cpp
M module-bsp/board/rt1051/puretx/irq_gpio.cpp
M module-bsp/hal/include/hal/battery_charger/AbstractBatteryCharger.hpp
M module-cellular/at/Cmd.hpp
M module-cellular/at/ErrorCode.hpp
M module-cellular/at/cmd/CLCC.hpp
M module-cellular/at/cmd/src/CLCC.cpp
M module-cellular/at/response.cpp
M module-cellular/modem/ATStream.cpp
M module-cellular/test/unittest_URC.cpp
M module-cellular/test/unittest_parse_result.cpp
M module-db/Common/Query.hpp
M module-db/Database/DatabaseInitializer.hpp
M module-db/Database/Field.cpp
M module-db/Interface/Record.hpp
M module-db/Interface/SMSRecord.hpp
M module-db/Interface/ThreadRecord.hpp
M module-db/Tables/NotesTable.cpp
M module-db/Tables/NotificationsTable.hpp
M module-db/Tables/Table.hpp
M module-db/queries/Filter.hpp
M module-db/queries/RecordQuery.hpp
M module-db/queries/messages/sms/QuerySMSGetForList.hpp
M module-db/tests/AlarmEventRecord_tests.cpp
M module-db/tests/NotesTable_tests.cpp
M module-db/tests/NotificationsTable_tests.cpp
M module-db/tests/ThreadRecord_tests.cpp
M module-gui/gui/Common.hpp
M module-gui/gui/widgets/BoxLayout.cpp
M module-gui/gui/widgets/BoxLayout.hpp
M module-gui/gui/widgets/CheckBox.hpp
M module-gui/gui/widgets/ImageBoxWithText.hpp
M module-gui/gui/widgets/ListItem.hpp
M module-gui/gui/widgets/SideListView.hpp
M module-gui/gui/widgets/ThreeBox.hpp
M module-gui/gui/widgets/header/Header.hpp
M module-gui/gui/widgets/status-bar/StatusBarWidgetBase.hpp
M module-gui/gui/widgets/text/core/lines/Lines.cpp
M module-gui/gui/widgets/text/parsers/RichTextParser.cpp
M module-gui/gui/widgets/visitor/ItemTree.hpp
M module-gui/test/test-catch-text/test-gui-Font.cpp
M module-gui/test/test-catch/test-language-input-parser.cpp
M module-services/service-antenna/ServiceAntenna.cpp
M module-services/service-antenna/include/service-antenna/ServiceAntenna.hpp
M module-services/service-antenna/include/service-antenna/ServiceState.hpp
M module-services/service-appmgr/data/MmiActionsParams.cpp
M module-services/service-audio/ServiceAudio.cpp
M module-services/service-audio/include/service-audio/ServiceAudio.hpp
M module-services/service-bluetooth/service-bluetooth/BluetoothDevicesModel.cpp
M module-services/service-bluetooth/service-bluetooth/ServiceBluetooth.hpp
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/Pdu.cpp
M module-services/service-cellular/ServiceCellular.cpp
M module-services/service-cellular/call/CallMachine.hpp
M module-services/service-cellular/call/CellularCall.cpp
M module-services/service-cellular/call/api/CallGUI.cpp
M module-services/service-cellular/call/api/CallGUI.hpp
M module-services/service-cellular/call/api/CallMulticast.hpp
M module-services/service-cellular/call/api/ModemCallApi.hpp
M module-services/service-cellular/call/include/call/CellularCall.hpp
M module-services/service-cellular/call/tests/test-CallMachine.cpp
M module-services/service-cellular/connection-manager/ConnectionManager.cpp
M module-services/service-cellular/service-cellular/PacketDataTypes.hpp
M module-services/service-cellular/service-cellular/ServiceCellular.hpp
M module-services/service-cellular/src/ServiceCellularPriv.cpp
M module-services/service-cellular/src/SimCard.hpp
M module-services/service-cellular/tests/unittest_smssendhandler.cpp
M module-services/service-db/DBServiceAPI_GetByQuery.cpp
M module-services/service-db/agents/quotes/QuotesAgent.cpp
M module-services/service-db/agents/settings/SettingsProxy.cpp
M module-services/service-db/agents/settings/SystemSettings.hpp
M module-services/service-db/include/service-db/PagedData.hpp
M module-services/service-db/test/test-service-db-quotes.cpp
M module-services/service-desktop/USBSecurityModel.cpp
M module-services/service-desktop/WorkerDesktop.cpp
M module-services/service-desktop/endpoints/filesystem/FileContext.cpp
M module-services/service-desktop/include/service-desktop/ServiceDesktop.hpp
M module-services/service-eink/ServiceEink.hpp
M module-services/service-eink/board/linux/renderer/src/RArea.hpp
M module-services/service-eink/messages/EinkMessage.hpp
M module-services/service-eink/messages/EinkModeMessage.hpp
M module-services/service-eink/messages/ImageMessage.cpp
M module-services/service-evtmgr/api/EventManagerServiceAPI.cpp
M module-services/service-evtmgr/battery/BatteryController.hpp
M module-services/service-evtmgr/screen-light-control/ScreenLightControl.hpp
M module-services/service-fileindexer/include/service-fileindexer/ServiceFileIndexer.hpp
M module-services/service-gui/service-gui/ServiceGUI.hpp
M module-services/service-test/include/service-test/ServiceTest.hpp
M module-services/service-time/AlarmOperations.hpp
M module-services/service-time/AlarmRepository.hpp
M module-services/service-time/AlarmServiceAPI.cpp
M module-services/service-time/ServiceTime.hpp
M module-sys/PhoneModes/Observer.cpp
M module-sys/Service/details/bus/Bus.cpp
M module-sys/Service/include/Service/BusProxy.hpp
M module-sys/Service/include/Service/Mailbox.hpp
M module-sys/Service/include/Service/Service.hpp
M module-sys/Service/include/Service/ServiceCreator.hpp
M module-sys/Service/include/Service/ServiceManifest.hpp
M module-sys/SystemManager/CpuGovernor.cpp
M module-sys/SystemManager/CpuSentinel.cpp
M module-sys/SystemManager/CpuStatistics.cpp
M module-sys/SystemManager/SystemManagerCommon.cpp
M module-sys/SystemManager/cpu/algorithm/FrequencyStepping.hpp
M module-sys/SystemManager/include/SystemManager/SystemManagerCommon.hpp
M module-sys/common/include/system/messages/RequestCpuFrequencyMessage.hpp
M module-utils/log/api/log/log.hpp
M module-utils/phonenumber/NumberHolderMatcher.hpp
M module-utils/rotator/include/rotator/Rotator.hpp
M module-utils/time/test/unittest_TimeZone.cpp
M module-utils/utility/Split.hpp
M module-utils/utility/Utils.hpp
M module-utils/utility/ValueScaler.hpp
M module-utils/utility/integer.hpp
M module-vfs/board/linux/purefs/src/fs/thread_local_cwd.cpp
M module-vfs/board/rt1051/newlib/vfs_io_syscalls.cpp
M module-vfs/drivers/include/purefs/fs/drivers/filesystem_vfat.hpp
M module-vfs/drivers/src/purefs/fs/filesystem_ext4.cpp
M module-vfs/drivers/src/purefs/fs/filesystem_littlefs.cpp
M module-vfs/drivers/src/purefs/fs/filesystem_vfat.cpp
M module-vfs/drivers/src/thirdparty/fatfs/ffsystem.cpp
M module-vfs/include/internal/purefs/vfs_subsystem_internal.hpp
M module-vfs/include/user/purefs/fs/filesystem.hpp
M module-vfs/include/user/purefs/fs/handle_mapper.hpp
M module-vfs/paths/filesystem_paths.cpp
M module-vfs/paths/include/purefs/filesystem_paths.hpp
M module-vfs/src/purefs/fs/filesystem.cpp
M products/BellHybrid/apps/application-bell-alarm/data/BellAlarmStyle.hpp
M products/BellHybrid/apps/application-bell-alarm/include/application-bell-alarm/ApplicationBellAlarm.hpp
M products/BellHybrid/apps/application-bell-alarm/presenter/BellAlarmWindowPresenter.hpp
M products/BellHybrid/apps/application-bell-background-sounds/include/application-bell-background-sounds/ApplicationBellBackgroundSounds.hpp
M products/BellHybrid/apps/application-bell-background-sounds/windows/BGSoundsProgressWindow.hpp
M products/BellHybrid/apps/application-bell-bedtime/include/application-bell-bedtime/ApplicationBellBedtime.hpp
M products/BellHybrid/apps/application-bell-main/include/application-bell-main/ApplicationBellMain.hpp
M products/BellHybrid/apps/application-bell-meditation-timer/include/application-bell-meditation-timer/MeditationTimer.hpp
M products/BellHybrid/apps/application-bell-meditation-timer/windows/MeditationCountdownWindow.hpp
M products/BellHybrid/apps/application-bell-onboarding/include/application-bell-onboarding/ApplicationBellOnBoarding.hpp
M products/BellHybrid/apps/application-bell-powernap/include/application-bell-powernap/ApplicationBellPowerNap.hpp
M products/BellHybrid/apps/application-bell-powernap/windows/PowerNapProgressWindow.hpp
M products/BellHybrid/apps/application-bell-settings/include/application-bell-settings/ApplicationBellSettings.hpp
M products/BellHybrid/apps/application-bell-settings/models/alarm_settings/SnoozeSettingsModel.cpp
M products/BellHybrid/apps/common/include/common/models/AbstractSettingsModel.hpp
M products/BellHybrid/apps/common/include/common/models/FrontlightModel.hpp
M products/BellHybrid/apps/common/include/common/models/SettingsModel.hpp
M products/BellHybrid/apps/common/include/common/widgets/list_items/details.hpp
M products/BellHybrid/apps/common/src/AudioModel.cpp
M products/BellHybrid/apps/common/src/models/SettingsModel.cpp
M products/BellHybrid/apps/common/src/windows/BellFinishedWindow.cpp
M products/BellHybrid/keymap/include/keymap/KeyMap.hpp
M products/BellHybrid/services/audio/include/audio/ServiceAudio.hpp
M products/BellHybrid/services/db/include/db/ServiceDB.hpp
M products/BellHybrid/services/db/tests/MeditationStatisticsTable_tests.cpp
M products/BellHybrid/services/evtmgr/include/evtmgr/EventManager.hpp
M products/BellHybrid/services/evtmgr/internal/key_sequences/AbstractKeySequence.hpp
M products/BellHybrid/services/evtmgr/internal/key_sequences/GenericLongPressSequence.hpp
M products/PurePhone/services/db/include/db/ServiceDB.hpp
M products/PurePhone/services/desktop/endpoints/messages/MessageHelper.cpp
M products/PurePhone/services/evtmgr/backlight-handler/BacklightHandler.cpp
M products/PurePhone/services/evtmgr/include/evtmgr/EventManager.hpp
M products/PurePhone/services/evtmgr/screen-light-control/ScreenLightControl.cpp
M .clang-format => .clang-format +1 -1
@@ 20,7 20,7 @@ AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
AlwaysBreakTemplateDeclarations: Yes
BasedOnStyle: Chromium
BinPackArguments: false
BinPackParameters: false

M board/linux/libiosyscalls/src/iosyscalls-internal.hpp => board/linux/libiosyscalls/src/iosyscalls-internal.hpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 37,7 37,7 @@ namespace vfsn::linux::internal
    bool is_image_DIR(__dirstream *indir);

    template <class Base, typename T, typename... Args>
    auto invoke_fs(T Base::*lfs_fun, Args &&... args)
    auto invoke_fs(T Base::*lfs_fun, Args &&...args)
        -> decltype((static_cast<Base *>(nullptr)->*lfs_fun)(std::forward<Args>(args)...))
    {
        auto vfs = purefs::subsystem::vfs_core();

M board/rt1051/memwrap.c => board/rt1051/memwrap.c +26 -26
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

//


@@ 12,51 12,51 @@

#include "memory/usermem.h"


void free(void *pv)
{
#if PROJECT_CONFIG_MEM_LEAKS_CHECKS == 1
    uint32_t caller = (uint32_t)__builtin_return_address (0);
  memleaks_log_free((uint32_t)pv,caller);
    uint32_t caller = (uint32_t)__builtin_return_address(0);
    memleaks_log_free((uint32_t)pv, caller);
#endif
    return userfree(pv);
}

void *malloc(size_t xWantedSize)
{
    void * ptr = usermalloc(xWantedSize);
    void *ptr = usermalloc(xWantedSize);

#if PROJECT_CONFIG_MEM_LEAKS_CHECKS == 1
    uint32_t caller = (uint32_t)__builtin_return_address (0);
  memleaks_log_malloc((uint32_t)ptr,(uint32_t)caller,xWantedSize);
    uint32_t caller = (uint32_t)__builtin_return_address(0);
    memleaks_log_malloc((uint32_t)ptr, (uint32_t)caller, xWantedSize);
#endif

    return ptr;
}

void* _malloc_r (struct _reent *r, size_t sz)
void *_malloc_r(struct _reent *r, size_t sz)
{
    void * ptr = usermalloc(sz);
    void *ptr = usermalloc(sz);

#if PROJECT_CONFIG_MEM_LEAKS_CHECKS == 1
    uint32_t caller = (uint32_t)__builtin_return_address (0);
  memleaks_log_malloc((uint32_t)ptr,(uint32_t)caller,sz);
    uint32_t caller = (uint32_t)__builtin_return_address(0);
    memleaks_log_malloc((uint32_t)ptr, (uint32_t)caller, sz);
#endif

    return ptr;
}

void* calloc (size_t num, size_t size)
void *calloc(size_t num, size_t size)
{
    size_t total = num * size;
    void * p = usermalloc(total);
    void *p      = usermalloc(total);

#if PROJECT_CONFIG_MEM_LEAKS_CHECKS == 1
    uint32_t caller = (uint32_t)__builtin_return_address (0);
  memleaks_log_malloc((uint32_t)p,(uint32_t)caller,total);
    uint32_t caller = (uint32_t)__builtin_return_address(0);
    memleaks_log_malloc((uint32_t)p, (uint32_t)caller, total);
#endif

    if (!p) return NULL;
    if (!p)
        return NULL;

    return memset(p, 0, total);
}


@@ 66,32 66,32 @@ void *realloc(void *aptr, size_t nbytes)
    return userrealloc(aptr, nbytes);
}


void* _calloc_r (struct _reent *r, size_t a, size_t b)
void *_calloc_r(struct _reent *r, size_t a, size_t b)
{
    size_t total = a * b;
    void * p = usermalloc(total);
    void *p      = usermalloc(total);

#if PROJECT_CONFIG_MEM_LEAKS_CHECKS == 1
    uint32_t caller = (uint32_t)__builtin_return_address (0);
  memleaks_log_malloc((uint32_t)p,(uint32_t)caller,total);
    uint32_t caller = (uint32_t)__builtin_return_address(0);
    memleaks_log_malloc((uint32_t)p, (uint32_t)caller, total);
#endif

    if (!p) return NULL;
    if (!p)
        return NULL;

    return memset(p, 0, total);
}

void _free_r (struct _reent *r, void* x)
void _free_r(struct _reent *r, void *x)
{
#if PROJECT_CONFIG_MEM_LEAKS_CHECKS == 1
    uint32_t caller = (uint32_t)__builtin_return_address (0);
  memleaks_log_free((uint32_t)x,caller);
    uint32_t caller = (uint32_t)__builtin_return_address(0);
    memleaks_log_free((uint32_t)x, caller);
#endif
    return userfree(x);
}

void* _realloc_r (struct _reent *r, void* x, size_t sz)
void *_realloc_r(struct _reent *r, void *x, size_t sz)
{
    return realloc(x, sz);
}

M config/clang/clang-common.sh => config/clang/clang-common.sh +12 -3
@@ 1,5 1,5 @@
#!/bin/env bash
# Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
# Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
# For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

set -eo pipefail


@@ 48,9 48,18 @@ get_tool() {
    echo "${tool}"
}

## Search for clang-format-diff.py
## Search for clang-format.py
get_clang_format() {
    local searchpaths=(
        "$(which "clang-format" 2>/dev/null 1>/dev/null)"  # clang-format in path
        "/usr/bin/clang-format-*"
    )
    get_tool "clang-format" "${searchpaths[@]}"
}

## Search for clang-format-diff.py
get_clang_format_diff() {
    local searchpaths=(
        "$(which "clang-format-diff.py" 2>/dev/null 1>/dev/null)"  # clang-format-diff in path
        "/usr/share/clang/clang-format-*/clang-format-diff.py"     # clang-format-diff location on Ubuntu/Debian
        "/usr/share/clang/clang-format-diff.py"                    # clang-format_diff location on Arch last resort


@@ 59,7 68,7 @@ get_clang_format() {
}

## search for clang-tidy-diff
get_clang_tidy()
get_clang_tidy_diff()
{
    local searchpaths=(
        "$(which "clang-tidy-diff.py" 2>/dev/null 1>/dev/null)"  # clang-format-diff in path

M config/clang_check.sh => config/clang_check.sh +2 -2
@@ 1,5 1,5 @@
#!/bin/env bash
# Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
# Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
# For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

set -euo pipefail


@@ 54,7 54,7 @@ main()
        exit 0
    fi
    local tool
    tool=$(get_clang_tidy)
    tool=$(get_clang_tidy_diff)
    echo "Target branch: ${CHANGE_TARGET}"

    local files_to_check

M config/format-config.sh => config/format-config.sh +2 -1
@@ 57,13 57,14 @@ export declare ignore_paths=(
    'module-vfs/board/free_rtos_custom/include/FreeRTOSFATConfig.h'
    'module-vfs/drivers/include/thirdparty/fatfs/ffconf.h'
    'module-vfs/thirdparty/*'
    'test/'
    'third-party/'
)

# bash function using above config function
shouldnt_ignore() {
    # change full name path to path relative to root git dir
    local fname=${1/"$L_GIT_DIR"/"./"}
    local fname=${1/"$L_GIT_DIR/"/}
    for el in ${ignore_paths[@]}; do
        if [[ ${fname}  =~ ^${el}.* ]]; then
            [[ $VERBOSE ]] && echo "Ignore: ${fname} formatting due to: $el match!"

M config/style_check_hook.sh => config/style_check_hook.sh +37 -3
@@ 33,9 33,15 @@ fi

verify_clang_format_version

L_CLANG_DIFF_TOOL=$(get_clang_format)
L_CLANG_TOOL=$(get_clang_format)
if ! [[ $L_CLANG_TOOL ]] || [[ $L_CLANG_TOOL == "" ]]; then
    [[ $VERBOSE ]] && echo "clang-format not found"
    exit 1
fi

L_CLANG_DIFF_TOOL=$(get_clang_format_diff)
if ! [[ $L_CLANG_DIFF_TOOL ]] || [[ $L_CLANG_DIFF_TOOL == "" ]]; then
    [[ $VERBOSE ]] && echo "clang tool not found"
    [[ $VERBOSE ]] && echo "clang-format-diff not found"
    exit 1
fi



@@ 79,6 85,22 @@ check_file() {
                fi
            fi
            ;;
        "All")
            if [[ ${FIX,,} == "true" ]]; then
                ${L_CLANG_TOOL} -style file -i ${file}
                STATUS=$(git status --short -- "${file}")
                if [ -n "${STATUS}" ]; then
                    git add "${file}"
                    results["${file}"]="${FIXED}";
                fi
            else
                OUT=$(${L_CLANG_TOOL} -style file ${file})
                if [ -n "${OUT}" ]; then
                    results["${file}"]="${ERROR}"
                    return 1
                fi
            fi
            ;;
        *)
            OUT=$(git diff -U0 --no-color --cached "${file}" | ${L_CLANG_DIFF_TOOL} -style file -p1 )
            if [[ -n ${OUT} ]]; then


@@ 100,6 122,8 @@ function help() {
		        --last              checks current branch against origin/master - doesn't fix
		        --branch-fix        checks current branch against origin/master and fixes errors - you have to 'git add' and 'git commit' them
		        --fix               fix style in currently staged files (ignores user.fixinstage variale), this is usefull for manual style applying
		        --all               check style in all files
		        --fix-all           fix style in all files
		
		If you would like to automatically fix style before commit
		add to your git config "user.fixinstage" variable with value "True"


@@ 129,7 153,17 @@ case "${1}" in
    --fix)
        FILES=$(git diff-index --cached --name-only HEAD)
        LAST="Stage" 
        FIX=true
        FIX="true"
        ;;
    --all)
        FILES=$(find $L_GIT_DIR -type f -name '*.cpp' -o -name '*.hpp' -o -name '*.c' -o -name '*.h' -o -name '*.cxx' -o -name '*.gcc' -o -name '*.cc')
        LAST="All" 
        FIX="false"
        ;;
    --fix-all)
        FILES=$(find $L_GIT_DIR -type f -name '*.cpp' -o -name '*.hpp' -o -name '*.c' -o -name '*.h' -o -name '*.cxx' -o -name '*.gcc' -o -name '*.cc')
        LAST="All" 
        FIX="true"
        ;;
    *)
        if [[ $# -ne 0 ]]; then

M host-tools/genlittlefs/lfs_ioaccess.c => host-tools/genlittlefs/lfs_ioaccess.c +5 -5
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <lfs.h>


@@ 214,10 214,10 @@ struct lfs_ioaccess_context *lfs_ioaccess_open(struct lfs_config *cfg,
    }
    ret->part_offs = start_pos;
    // Mount the file system
    cfg->read    = lfs_read;
    cfg->prog    = lfs_prog;
    cfg->erase   = lfs_erase;
    cfg->sync    = lfs_sync;
    cfg->read  = lfs_read;
    cfg->prog  = lfs_prog;
    cfg->erase = lfs_erase;
    cfg->sync  = lfs_sync;
#ifdef LFS_THREADSAFE
    cfg->lock   = lfs_lock_unlock;
    cfg->unlock = lfs_lock_unlock;

M host-tools/genlittlefs/mklfs.c => host-tools/genlittlefs/mklfs.c +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <lfs.h>


@@ 366,7 366,7 @@ int main(int argc, char **argv)
        }
    }
    const lfs_ssize_t used_blocks = lfs_fs_size(&lfs);
    err = lfs_unmount(&lfs);
    err                           = lfs_unmount(&lfs);
    if (err < 0) {
        fprintf(stderr, "lfs umount error: error=%d\n", err);
        lfs_ioaccess_close(ioctx);

M module-apps/application-alarm-clock/ApplicationAlarmClock.hpp => module-apps/application-alarm-clock/ApplicationAlarmClock.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 38,7 38,8 @@ namespace app
        std::shared_ptr<SoundsPlayer> soundsPlayer;
    };

    template <> struct ManifestTraits<ApplicationAlarmClock>
    template <>
    struct ManifestTraits<ApplicationAlarmClock>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M module-apps/application-alarm-clock/data/AlarmsData.hpp => module-apps/application-alarm-clock/data/AlarmsData.hpp +1 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 29,4 29,3 @@ class AlarmRecordData : public gui::SwitchData
        record = std::move(rec);
    }
};


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

#include "AlarmsRepository.hpp"


@@ 19,8 19,8 @@ namespace app::alarmClock
    void AlarmsDBRepository::getLimited(std::uint32_t offset, std::uint32_t limit, const OnGetCallback &callback)
    {
        auto request = std::make_unique<alarms::AlarmsGetInRangeRequestMessage>(offset, limit);
        auto task = async(std::move(request), service::name::service_time); // -> std::unique_ptr<AsyncRequest>;
        auto cb   = [callback](auto response) {
        auto task    = async(std::move(request), service::name::service_time); // -> std::unique_ptr<AsyncRequest>;
        auto cb      = [callback](auto response) {
            auto result = dynamic_cast<alarms::AlarmsGetInRangeResponseMessage *>(response);
            if (result == nullptr) {
                LOG_ERROR("BAD RESULT");

M module-apps/application-alarm-clock/widgets/AlarmClockStyle.hpp => module-apps/application-alarm-clock/widgets/AlarmClockStyle.hpp +11 -11
@@ 26,21 26,21 @@ namespace style::alarmClock

        namespace item
        {
            inline constexpr auto height         = 100;
            inline constexpr auto botMargin      = 4;
            inline constexpr auto imageMargin    = 150;
            inline constexpr auto timeHeight     = 60 - style::margins::small;
            inline constexpr auto periodHeight   = 40;
            inline constexpr auto height       = 100;
            inline constexpr auto botMargin    = 4;
            inline constexpr auto imageMargin  = 150;
            inline constexpr auto timeHeight   = 60 - style::margins::small;
            inline constexpr auto periodHeight = 40;

            namespace time
            {
                inline constexpr auto width        = style::listview::item_width_with_without_scroll;
                inline constexpr auto height       = 80;
                inline constexpr auto marginTop    = 32;
                inline constexpr auto marginBot    = 20;
                inline constexpr auto separator    = 30;
                inline constexpr auto width     = style::listview::item_width_with_without_scroll;
                inline constexpr auto height    = 80;
                inline constexpr auto marginTop = 32;
                inline constexpr auto marginBot = 20;
                inline constexpr auto separator = 30;
            } // namespace time
        } // namespace item
        }     // namespace item

    } // namespace window
} // namespace style::alarmClock

M module-apps/application-alarm-clock/widgets/AlarmRRuleOptionsItem.hpp => module-apps/application-alarm-clock/widgets/AlarmRRuleOptionsItem.hpp +4 -4
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 14,9 14,9 @@ namespace gui
    class AlarmRRuleOptionsItem : public AlarmOptionsItem, public app::alarmClock::AlarmRRuleItem
    {
      private:
        app::ApplicationCommon *app                                  = nullptr;
        std::function<void(const UTF8 &text)> navBarTemporaryMode    = nullptr;
        std::function<void()> navBarRestoreFromTemporaryMode         = nullptr;
        app::ApplicationCommon *app                               = nullptr;
        std::function<void(const UTF8 &text)> navBarTemporaryMode = nullptr;
        std::function<void()> navBarRestoreFromTemporaryMode      = nullptr;

        using RRule                                             = app::alarmClock::AlarmRRulePresenter::RRuleOptions;
        std::vector<std::pair<RRule, std::string>> rRuleOptions = {

M module-apps/application-alarm-clock/widgets/AlarmTimeItem.cpp => module-apps/application-alarm-clock/widgets/AlarmTimeItem.cpp +2 -1
@@ 248,7 248,8 @@ namespace gui
        }
    }

    template <typename T> UTF8 AlarmTimeItem::timeValueToPaddedString(const T &value)
    template <typename T>
    UTF8 AlarmTimeItem::timeValueToPaddedString(const T &value)
    {
        std::ostringstream oss;
        oss << std::setw(2) << std::setfill('0') << value;

M module-apps/application-alarm-clock/widgets/AlarmTimeItem.hpp => module-apps/application-alarm-clock/widgets/AlarmTimeItem.hpp +2 -1
@@ 27,7 27,8 @@ namespace gui
        [[nodiscard]] bool isPm(const std::string &text) const;
        void validateHour();

        template <typename T> UTF8 timeValueToPaddedString(const T &value);
        template <typename T>
        UTF8 timeValueToPaddedString(const T &value);

      public:
        AlarmTimeItem(std::function<void(const UTF8 &text)> navBarTemporaryMode = nullptr,

M module-apps/application-alarm-clock/windows/AlarmClockMainWindow.cpp => module-apps/application-alarm-clock/windows/AlarmClockMainWindow.cpp +1 -1
@@ 85,7 85,7 @@ namespace app::alarmClock
        }

        if (inputEvent.isShortRelease(gui::KeyCode::KEY_LEFT)) {
            auto rec                              = new AlarmEventRecord();
            auto rec = new AlarmEventRecord();

            const auto now   = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
            const auto local = std::localtime(&now);

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

#pragma once


@@ 14,8 14,8 @@ namespace app::alarmClock
{
    class AlarmClockMainWindow : public gui::AppWindow, public AlarmClockMainWindowContract::View
    {
        gui::Icon *emptyListIcon   = nullptr;
        gui::ListView *alarmsList  = nullptr;
        gui::Icon *emptyListIcon  = nullptr;
        gui::ListView *alarmsList = nullptr;
        std::unique_ptr<AlarmClockMainWindowContract::Presenter> presenter;
        void onEmptyList();
        void onListFilled();

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

#pragma once


@@ 69,7 69,8 @@ namespace app
        std::vector<app::antenna::StoreParams> highBandParams;
    };

    template <> struct ManifestTraits<ApplicationAntenna>
    template <>
    struct ManifestTraits<ApplicationAntenna>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

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

#pragma once


@@ 57,4 57,3 @@ namespace gui
    };

} /* namespace gui */


M module-apps/application-calculator/include/application-calculator/ApplicationCalculator.hpp => module-apps/application-calculator/include/application-calculator/ApplicationCalculator.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 31,7 31,8 @@ namespace app
        void destroyUserInterface() final;
    };

    template <> struct ManifestTraits<ApplicationCalculator>
    template <>
    struct ManifestTraits<ApplicationCalculator>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

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

#pragma once


@@ 7,7 7,7 @@

namespace style::calculator
{
    inline constexpr auto grid_cells        = 9;
    inline constexpr auto grid_cells = 9;

    namespace window
    {

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

#pragma once


@@ 34,7 34,8 @@ namespace app
        void destroyUserInterface() override;
    };

    template <> struct ManifestTraits<ApplicationCalendar>
    template <>
    struct ManifestTraits<ApplicationCalendar>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M module-apps/application-calendar/widgets/DayLabel.cpp => module-apps/application-calendar/widgets/DayLabel.cpp +1 -3
@@ 71,9 71,7 @@ namespace gui
            else {
                this->dayNumber->setFont(style::window::font::medium);
            }
            this->activatedCallback = [=](gui::Item &item) {
                return true;
            };
            this->activatedCallback = [=](gui::Item &item) { return true; };
            this->setPenWidth(style::window::default_border_no_focus_w);
            this->setPenFocusWidth(style::window::default_border_focus_w);
            this->setEdges(RectangleEdge::Top | RectangleEdge::Bottom);

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

#include "CalendarMainWindow.hpp"


@@ 16,7 16,7 @@ namespace gui
        : AppWindow(app, name), app::AsyncCallbackReceiver{app}
    {
        std::chrono::system_clock::time_point tp = std::chrono::system_clock::now();
        this->actualDate = date::year_month_day{date::floor<date::days>(tp)};
        this->actualDate                         = date::year_month_day{date::floor<date::days>(tp)};
        std::fill(std::begin(isDayEmpty), std::end(isDayEmpty), true);
        buildInterface();
    }

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

#pragma once


@@ 38,7 38,7 @@ namespace gui
      protected:
        date::year_month_day actualDate;
        MonthBox *monthBox = nullptr;
        Label *dateLabel = nullptr;
        Label *dateLabel   = nullptr;
        std::unique_ptr<MonthModel> monthModel;

      public:

M module-apps/application-call/include/application-call/ApplicationCall.hpp => module-apps/application-call/include/application-call/ApplicationCall.hpp +2 -1
@@ 83,7 83,8 @@ namespace app
        bool conditionalReturnToPreviousView();
    };

    template <> struct ManifestTraits<ApplicationCall>
    template <>
    struct ManifestTraits<ApplicationCall>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M module-apps/application-call/model/CallModel.hpp => module-apps/application-call/model/CallModel.hpp +7 -7
@@ 56,14 56,14 @@ namespace app::call
        virtual utils::PhoneNumber getPhoneNumber()                  = 0;
        virtual UTF8 getCallerId()                                   = 0;

        virtual void hangUpCall()                            = 0;
        virtual void answerCall()                            = 0;
        virtual bool sendSms(const UTF8 &smsBody)            = 0;
        virtual void hangUpCall()                               = 0;
        virtual void answerCall()                               = 0;
        virtual bool sendSms(const UTF8 &smsBody)               = 0;
        virtual void transmitDtmfTone(const uint8_t &digitCode) = 0;
        virtual void muteCall()                              = 0;
        virtual void unmuteCall()                            = 0;
        virtual void turnLoudspeakerOn()                     = 0;
        virtual void turnLoudspeakerOff()                    = 0;
        virtual void muteCall()                                 = 0;
        virtual void unmuteCall()                               = 0;
        virtual void turnLoudspeakerOn()                        = 0;
        virtual void turnLoudspeakerOff()                       = 0;

        virtual void turnOnKeypadBacklight()  = 0;
        virtual void turnOffKeypadBacklight() = 0;

M module-apps/application-call/widgets/StateIcon.hpp => module-apps/application-call/widgets/StateIcon.hpp +3 -2
@@ 19,7 19,7 @@ namespace gui
        constexpr uint32_t w                 = 150;
        constexpr uint32_t h                 = 100;
        constexpr uint32_t defaultSideMargin = 5;
    }     // namespace icon
    } // namespace icon

    /// @brief Icon widget with custom predefined images and strings
    /// images and strings are stored in predefined map passed to the class during construction


@@ 29,7 29,8 @@ namespace gui
    /// icon::h where w = icon::w + 2 * w_margin. It is necessary as it is possible that text will exceed Icon visible
    /// area

    template <class T> class StateIcon : public ImageBoxWithText
    template <class T>
    class StateIcon : public ImageBoxWithText
    {
      public:
        using IconMap = std::map<T, std::pair<const std::string, const std::string>>;

M module-apps/application-call/windows/CallWindow.cpp => module-apps/application-call/windows/CallWindow.cpp +1 -1
@@ 114,7 114,7 @@ namespace gui
        sendSmsIcon                    = new gui::SendSmsIcon(iconsBox);
        sendSmsIcon->activatedCallback = [=](gui::Item &item) {
            LOG_INFO("Send message template and reject the call");
            constexpr auto preventAutoLock  = true;
            constexpr auto preventAutoLock = true;
            auto msg = std::make_unique<SMSSendTemplateRequest>(presenter->getPhoneNumber().getView(), preventAutoLock);
            msg->ignoreCurrentWindowOnStack = true;
            return app::manager::Controller::sendAction(application,

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

#pragma once


@@ 18,7 18,6 @@ namespace gui
    class CallWindow : public AppWindow, public app::call::CallWindowContract::View
    {
      private:

        gui::KeyInputMappedTranslation translator;
        sys::TimerHandle delayedExitTimer;
        static constexpr inline auto callDelayedStopTime = std::chrono::milliseconds{3000};

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

#pragma once


@@ 34,9 34,9 @@ namespace calllog
    namespace settings
    {
        // Windows
        inline constexpr auto MainWindowStr    = gui::name::window::main_window;
        inline constexpr auto DetailsWindowStr = "DetailsWindow";
        inline constexpr auto DialogYesNoStr   = "DialogYesNo";
        inline constexpr auto MainWindowStr     = gui::name::window::main_window;
        inline constexpr auto DetailsWindowStr  = "DetailsWindow";
        inline constexpr auto DialogYesNoStr    = "DialogYesNo";
        inline constexpr auto CallLogOptionsStr = "CallLogOptions";

    } // namespace settings

M module-apps/application-calllog/include/application-calllog/ApplicationCallLog.hpp => module-apps/application-calllog/include/application-calllog/ApplicationCallLog.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 38,7 38,8 @@ namespace app
        bool setAllEntriesRead();
    };

    template <> struct ManifestTraits<ApplicationCallLog>
    template <>
    struct ManifestTraits<ApplicationCallLog>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M module-apps/application-calllog/widgets/CalllogItem.hpp => module-apps/application-calllog/widgets/CalllogItem.hpp +5 -5
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 15,10 15,10 @@ namespace gui

    namespace clItemStyle
    {
        inline constexpr auto w                 = style::window::default_body_width;
        inline constexpr auto h                 = style::window::label::big_h;
        inline constexpr auto internal_margin   = 4;
        inline constexpr auto right_margin      = 10;
        inline constexpr auto w               = style::window::default_body_width;
        inline constexpr auto h               = style::window::label::big_h;
        inline constexpr auto internal_margin = 4;
        inline constexpr auto right_margin    = 10;

        namespace timestamp
        {

M module-apps/application-desktop/include/application-desktop/ApplicationDesktop.hpp => module-apps/application-desktop/include/application-desktop/ApplicationDesktop.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 49,7 49,8 @@ namespace app
        bool blockAllPopups = false;
    };

    template <> struct ManifestTraits<ApplicationDesktop>
    template <>
    struct ManifestTraits<ApplicationDesktop>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M module-apps/application-desktop/widgets/DesktopInputWidget.cpp => module-apps/application-desktop/widgets/DesktopInputWidget.cpp +0 -1
@@ 4,7 4,6 @@
#include "DesktopInputWidget.hpp"
#include <service-cellular/CellularServiceAPI.hpp>


namespace style::desktop
{
    namespace inputWidget

M module-apps/application-desktop/widgets/DesktopInputWidget.hpp => module-apps/application-desktop/widgets/DesktopInputWidget.hpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 18,8 18,8 @@ namespace gui
    class DesktopInputWidget : public HBox
    {
        app::ApplicationCommon *application = nullptr;
        HBox *body                    = nullptr;
        gui::Image *replyImage        = nullptr;
        HBox *body                          = nullptr;
        gui::Image *replyImage              = nullptr;

      public:
        gui::Text *inputText = nullptr;

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

#include "ApplicationDesktop.hpp"


@@ 54,8 54,7 @@ namespace gui
    }

    void RebootWindow::onBeforeShow(ShowMode mode, SwitchData *data)
    {
    }
    {}

    bool RebootWindow::onInput(const InputEvent &inputEvent)
    {

M module-apps/application-meditation/data/Style.hpp => module-apps/application-meditation/data/Style.hpp +3 -3
@@ 47,9 47,9 @@ namespace style::meditation

    namespace intervalBox
    {
        constexpr auto X      = style::window::default_left_margin;
        constexpr auto Y      = style::meditation::timer::Y + 2 * style::meditation::timer::Radius + VerticalWidgetGap;
        constexpr auto Width  = style::window::default_body_width;
        constexpr auto X     = style::window::default_left_margin;
        constexpr auto Y     = style::meditation::timer::Y + 2 * style::meditation::timer::Radius + VerticalWidgetGap;
        constexpr auto Width = style::window::default_body_width;
    } // namespace intervalBox

    namespace itemList

M module-apps/application-meditation/include/application-meditation/ApplicationMeditation.hpp => module-apps/application-meditation/include/application-meditation/ApplicationMeditation.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 30,7 30,8 @@ namespace app
        std::unique_ptr<gui::OptionsData> state;
    };

    template <> struct ManifestTraits<ApplicationMeditation>
    template <>
    struct ManifestTraits<ApplicationMeditation>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

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

#pragma once


@@ 24,6 24,6 @@ namespace gui
      private:
        void invalidate() noexcept;
        TimerProperty *timeSetter = nullptr;
        IntervalBox *intervalBox = nullptr;
        IntervalBox *intervalBox  = nullptr;
    };
} // namespace gui

M module-apps/application-messages/data/MessagesStyle.hpp => module-apps/application-messages/data/MessagesStyle.hpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 54,9 54,9 @@ namespace style
            }
            namespace text
            {
                inline constexpr uint32_t h = 43;
                inline constexpr uint32_t h    = 43;
                inline constexpr uint32_t maxH = 320;
            }
            } // namespace text
            namespace messageLabel
            {
                inline constexpr uint32_t h = 44;

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

#pragma once


@@ 68,7 68,8 @@ namespace app
        std::function<bool(std::shared_ptr<SMSTemplateRecord> templ)> templatesCallback;
    };

    template <> struct ManifestTraits<ApplicationMessages>
    template <>
    struct ManifestTraits<ApplicationMessages>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M module-apps/application-messages/widgets/SMSInputWidget.hpp => module-apps/application-messages/widgets/SMSInputWidget.hpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 17,8 17,8 @@ namespace gui
    class SMSInputWidget : public ListItem
    {
        app::ApplicationCommon *application = nullptr;
        HBox *body                    = nullptr;
        gui::Image *replyImage        = nullptr;
        HBox *body                          = nullptr;
        gui::Image *replyImage              = nullptr;

      public:
        gui::Text *inputText = nullptr;

M module-apps/application-messages/windows/NewMessage.cpp => module-apps/application-messages/windows/NewMessage.cpp +1 -1
@@ 71,7 71,7 @@ namespace gui

        if (auto searchRequest = dynamic_cast<PhonebookSearchRequest *>(data); searchRequest != nullptr) {
            LOG_INFO("Received search results");
            contact = searchRequest->result;
            contact        = searchRequest->result;
            selectedNumber = searchRequest->selectedNumber;
            recipient->setText(contact->getFormattedName());
        }

M module-apps/application-music-player/include/application-music-player/ApplicationMusicPlayer.hpp => module-apps/application-music-player/include/application-music-player/ApplicationMusicPlayer.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 59,7 59,8 @@ namespace app
        std::unique_ptr<music_player::internal::MusicPlayerPriv> priv;
    };

    template <> struct ManifestTraits<ApplicationMusicPlayer>
    template <>
    struct ManifestTraits<ApplicationMusicPlayer>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M module-apps/application-music-player/widgets/SongItem.hpp => module-apps/application-music-player/widgets/SongItem.hpp +11 -11
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 31,16 31,16 @@ namespace gui
        void setState(ItemState state);

      private:
        VBox *vBox                                                   = nullptr;
        HBox *firstHBox                                              = nullptr;
        HBox *secondHBox                                             = nullptr;
        Label *authorText                                            = nullptr;
        Label *songText                                              = nullptr;
        TextFixedSize *durationText                                  = nullptr;
        Image *playedSong                                            = nullptr;
        ItemState itemState                                          = ItemState::None;
        std::function<void(const UTF8 &text)> navBarTemporaryMode    = nullptr;
        std::function<void()> navBarRestoreFromTemporaryMode         = nullptr;
        VBox *vBox                                                = nullptr;
        HBox *firstHBox                                           = nullptr;
        HBox *secondHBox                                          = nullptr;
        Label *authorText                                         = nullptr;
        Label *songText                                           = nullptr;
        TextFixedSize *durationText                               = nullptr;
        Image *playedSong                                         = nullptr;
        ItemState itemState                                       = ItemState::None;
        std::function<void(const UTF8 &text)> navBarTemporaryMode = nullptr;
        std::function<void()> navBarRestoreFromTemporaryMode      = nullptr;
    };

} /* namespace gui */

M module-apps/application-notes/include/application-notes/ApplicationNotes.hpp => module-apps/application-notes/include/application-notes/ApplicationNotes.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 37,7 37,8 @@ namespace app
        void destroyUserInterface() override;
    };

    template <> struct ManifestTraits<ApplicationNotes>
    template <>
    struct ManifestTraits<ApplicationNotes>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M module-apps/application-notes/model/NotesListModel.hpp => module-apps/application-notes/model/NotesListModel.hpp +1 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 6,7 6,6 @@
#include <cstdint>
#include <vector>


#include <module-gui/gui/widgets/ListItemProvider.hpp>

#include "NotesRepository.hpp"

M module-apps/application-notes/presenter/SearchEngineWindowPresenter.hpp => module-apps/application-notes/presenter/SearchEngineWindowPresenter.hpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 15,14 15,14 @@ namespace app::notes
        class View
        {
          public:
            virtual ~View() noexcept = default;
            virtual ~View() noexcept                                       = default;
            virtual void emptySearch()                                     = 0;
            virtual void processValidSearch(const std::string &searchText) = 0;
        };
        class Presenter : public BasePresenter<SearchEngineWindowContract::View>
        {
          public:
            virtual ~Presenter() noexcept = default;
            virtual ~Presenter() noexcept                         = default;
            virtual void searchFor(const std::string &searchText) = 0;
        };
    };

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

#pragma once


@@ 34,7 34,7 @@ namespace app::notes
        void onListFilled();

        std::unique_ptr<NotesMainWindowContract::Presenter> presenter;
        gui::ListView *list         = nullptr;
        gui::Icon *emptyListIcon    = nullptr;
        gui::ListView *list      = nullptr;
        gui::Icon *emptyListIcon = nullptr;
    };
} // namespace app::notes

M module-apps/application-onboarding/ApplicationOnBoarding.hpp => module-apps/application-onboarding/ApplicationOnBoarding.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 43,7 43,8 @@ namespace app
        void destroyUserInterface() override;
    };

    template <> struct ManifestTraits<ApplicationOnBoarding>
    template <>
    struct ManifestTraits<ApplicationOnBoarding>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M module-apps/application-onboarding/data/OnBoardingSwitchData.hpp => module-apps/application-onboarding/data/OnBoardingSwitchData.hpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 16,4 16,4 @@ namespace app::onBoarding
        OnBoardingSwitchData() : SwitchData("onBoardingSwitchData")
        {}
    };
} // namespace gui
} // namespace app::onBoarding

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

#include "EULARepository.hpp"


@@ 16,8 16,8 @@ namespace app::onBoarding
    std::string EULARepository::getEulaText()
    {
        const auto &displayLanguageName = utils::getDisplayLanguage();
        auto eulaFile            = std::ifstream(licensesPath / displayLanguageName / fileName);
        auto fileHandlerCleanup  = gsl::finally([&eulaFile]() { eulaFile.close(); });
        auto eulaFile                   = std::ifstream(licensesPath / displayLanguageName / fileName);
        auto fileHandlerCleanup         = gsl::finally([&eulaFile]() { eulaFile.close(); });

        if (!eulaFile.is_open()) {
            eulaFile.open(licensesPath / utils::getDefaultLanguage() / fileName);

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

#pragma once


@@ 16,4 16,4 @@ namespace app::onBoarding
        void onBeforeShow(gui::ShowMode mode, gui::SwitchData *data) override;
        bool onInput(const gui::InputEvent &inputEvent) override;
    };
} /* namespace gui */
} // namespace app::onBoarding

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

#pragma once


@@ 20,4 20,4 @@ namespace app::onBoarding

        void buildInterface() override;
    };
} // namespace gui
} // namespace app::onBoarding

M module-apps/application-phonebook/include/application-phonebook/ApplicationPhonebook.hpp => module-apps/application-phonebook/include/application-phonebook/ApplicationPhonebook.hpp +2 -1
@@ 56,7 56,8 @@ namespace app
        bool searchEmpty(const std::string &query);
    };

    template <> struct ManifestTraits<ApplicationPhonebook>
    template <>
    struct ManifestTraits<ApplicationPhonebook>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M module-apps/application-phonebook/models/NewContactModel.hpp => module-apps/application-phonebook/models/NewContactModel.hpp +1 -1
@@ 14,7 14,7 @@
class NewContactModel : public app::InternalModel<gui::ContactListItem *>, public gui::ListItemProvider
{
  private:
    app::ApplicationCommon *application = nullptr;
    app::ApplicationCommon *application        = nullptr;
    PhonebookItemData::RequestType requestType = PhonebookItemData::RequestType::Internal;

    void openTextOptions(gui::Text *text);

M module-apps/application-phonebook/widgets/ContactFlagsStyle.hpp => module-apps/application-phonebook/widgets/ContactFlagsStyle.hpp +4 -4
@@ 11,10 11,10 @@ namespace style
    {
        namespace ContactFlag
        {
            const uint32_t iconsSize   = 35;
            const uint32_t height      = 74;
            const uint32_t itemWidth   = 125;
            const uint32_t itemHeight  = 64;
            const uint32_t iconsSize  = 35;
            const uint32_t height     = 74;
            const uint32_t itemWidth  = 125;
            const uint32_t itemHeight = 64;
        } // namespace ContactFlag
    }     // namespace widget
} // namespace style

M module-apps/application-phonebook/widgets/InputBoxWithLabelAndIconWidget.hpp => module-apps/application-phonebook/widgets/InputBoxWithLabelAndIconWidget.hpp +6 -6
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 24,11 24,11 @@ namespace gui
                                       std::function<void(const UTF8 &text)> navBarTemporaryMode = nullptr,
                                       std::function<void()> navBarRestoreFromTemporaryMode      = nullptr);
        ~InputBoxWithLabelAndIconWidget() override = default;
        gui::HBox *hBox              = nullptr;
        gui::Label *inputBoxLabel    = nullptr;
        gui::Label *descriptionLabel = nullptr;
        gui::Image *iconImage        = nullptr;
        gui::Image *tickImage        = nullptr;
        gui::HBox *hBox                            = nullptr;
        gui::Label *inputBoxLabel                  = nullptr;
        gui::Label *descriptionLabel               = nullptr;
        gui::Image *iconImage                      = nullptr;
        gui::Image *tickImage                      = nullptr;

      private:
        std::function<void(const UTF8 &text)> navBarTemporaryMode = nullptr;

M module-apps/application-settings/ApplicationSettings.cpp => module-apps/application-settings/ApplicationSettings.cpp +1 -1
@@ 176,7 176,7 @@ namespace app
        });

        connect(typeid(::message::bluetooth::ResponseStatus), [&](sys::Message *msg) {
            auto responseStatusMsg = static_cast<::message::bluetooth::ResponseStatus *>(msg);
            auto responseStatusMsg    = static_cast<::message::bluetooth::ResponseStatus *>(msg);
            const auto status         = responseStatusMsg->getStatus();
            const auto bluetoothState = status.state == BluetoothStatus::State::On;
            bluetoothSettingsModel->setStatus(bluetoothState, status.visibility);

M module-apps/application-settings/include/application-settings/ApplicationSettings.hpp => module-apps/application-settings/include/application-settings/ApplicationSettings.hpp +9 -8
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 194,16 194,17 @@ namespace app
        Store::GSM::SIM selectedSim   = Store::GSM::get()->selected;
        std::string selectedSimNumber = {};

        bool operatorsOn              = false;
        bool voLteStateOn             = false;
        bool notificationsWhenLocked  = true;
        bool callsFromFavorites       = false;
        int connectionFrequency       = 0;
        bool flightModeOn             = true;
        bool operatorsOn                                               = false;
        bool voLteStateOn                                              = false;
        bool notificationsWhenLocked                                   = true;
        bool callsFromFavorites                                        = false;
        int connectionFrequency                                        = 0;
        bool flightModeOn                                              = true;
        std::shared_ptr<BluetoothSettingsModel> bluetoothSettingsModel = nullptr;
    };

    template <> struct ManifestTraits<ApplicationSettings>
    template <>
    struct ManifestTraits<ApplicationSettings>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

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

#pragma once


@@ 14,7 14,7 @@ class TechnicalWindowContract
    class View
    {
      public:
        virtual ~View() noexcept = default;
        virtual ~View() noexcept          = default;
        virtual void imeiReady() noexcept = 0;
    };
    class Presenter : public app::BasePresenter<TechnicalWindowContract::View>

M module-apps/application-settings/widgets/SettingsStyle.hpp => module-apps/application-settings/widgets/SettingsStyle.hpp +0 -1
@@ 50,7 50,6 @@ namespace style
                inline constexpr uint32_t h = style::window_height - y - style::nav_bar::height;
            } // namespace newApn


            namespace phone_modes
            {
                inline constexpr auto body_offset = 155U;

M module-apps/application-settings/widgets/display-keypad/CategoryWidget.hpp => module-apps/application-settings/widgets/display-keypad/CategoryWidget.hpp +4 -4
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 27,9 27,9 @@ namespace gui
        gui::Image *tickImage        = nullptr;

        Quotes::CategoryRecord category;
        std::function<void(bool)> enableCategory                     = nullptr;
        std::function<void(const UTF8 &text)> navBarTemporaryMode    = nullptr;
        std::function<void()> navBarRestoreFromTemporaryMode         = nullptr;
        std::function<void(bool)> enableCategory                  = nullptr;
        std::function<void(const UTF8 &text)> navBarTemporaryMode = nullptr;
        std::function<void()> navBarRestoreFromTemporaryMode      = nullptr;
    };

} /* namespace gui */

M module-apps/application-settings/widgets/display-keypad/QuoteWidget.hpp => module-apps/application-settings/widgets/display-keypad/QuoteWidget.hpp +4 -4
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 30,9 30,9 @@ namespace gui
        ImageBox *tickImage     = nullptr;

        Quotes::QuoteRecord quote;
        std::function<void(bool)> enableQuote                        = nullptr;
        std::function<void(const UTF8 &text)> navBarTemporaryMode    = nullptr;
        std::function<void()> navBarRestoreFromTemporaryMode         = nullptr;
        std::function<void(bool)> enableQuote                     = nullptr;
        std::function<void(const UTF8 &text)> navBarTemporaryMode = nullptr;
        std::function<void()> navBarRestoreFromTemporaryMode      = nullptr;
    };

} /* namespace gui */

M module-apps/application-settings/windows/WindowNames.hpp => module-apps/application-settings/windows/WindowNames.hpp +4 -4
@@ 13,10 13,10 @@ namespace gui::window::name
    inline constexpr auto status_bar_img_type = "StatusBarImgType";
    inline constexpr auto text_image_color    = "TextImageColor";

    inline constexpr auto bluetooth               = "Bluetooth";
    inline constexpr auto all_devices             = "AllDevices";
    inline constexpr auto phone_name              = "PhoneName";
    inline constexpr auto add_device              = "AddDevice";
    inline constexpr auto bluetooth   = "Bluetooth";
    inline constexpr auto all_devices = "AllDevices";
    inline constexpr auto phone_name  = "PhoneName";
    inline constexpr auto add_device  = "AddDevice";

    inline constexpr auto network          = "Network";
    inline constexpr auto sim_cards        = "SimCards";

M module-apps/application-settings/windows/advanced/CPUModeTestWindow.cpp => module-apps/application-settings/windows/advanced/CPUModeTestWindow.cpp +2 -1
@@ 14,7 14,8 @@

namespace magic_enum
{
    template <> struct customize::enum_range<bsp::CpuFrequencyMHz>
    template <>
    struct customize::enum_range<bsp::CpuFrequencyMHz>
    {
        static constexpr int min = 0;
        static constexpr int max = 528;

M module-apps/application-settings/windows/bluetooth/BluetoothWindow.hpp => module-apps/application-settings/windows/bluetooth/BluetoothWindow.hpp +2 -2
@@ 20,8 20,8 @@ namespace gui
        void changeVisibility(bool &currentVisibility);

        std::shared_ptr<BluetoothSettingsModel> bluetoothSettingsModel;
        bool isBluetoothSwitchOn       = false;
        bool isPhoneVisibilitySwitchOn = false;
        bool isBluetoothSwitchOn            = false;
        bool isPhoneVisibilitySwitchOn      = false;
        OptionWindowDestroyer rai_destroyer = OptionWindowDestroyer(*this);
    };
} // namespace gui

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

#include "KeypadLightWindow.hpp"


@@ 18,7 18,7 @@ namespace gui

        switch (keypadBacklightState) {
        case bsp::keypad_backlight::State::activeMode:
            isActiveSwitchOn    = true;
            isActiveSwitchOn = true;
            break;
        case bsp::keypad_backlight::State::off:
            isActiveSwitchOn = false;


@@ 30,7 30,7 @@ namespace gui

    void KeypadLightWindow::switchHandler(bool &toggleSwitch)
    {
        toggleSwitch       = !toggleSwitch;
        toggleSwitch = !toggleSwitch;
        if (isActiveSwitchOn) {
            keypadLightSettings->setKeypadBacklightState(bsp::keypad_backlight::State::activeMode);
        }

M module-apps/application-settings/windows/display-keypad/KeypadLightWindow.hpp => module-apps/application-settings/windows/display-keypad/KeypadLightWindow.hpp +1 -1
@@ 18,7 18,7 @@ namespace gui
        void switchHandler(bool &onOffSwitch);
        std::list<Option> buildOptionsList() override;

        bool isActiveSwitchOn            = false;
        bool isActiveSwitchOn               = false;
        OptionWindowDestroyer rai_destroyer = OptionWindowDestroyer(*this);
    };
} // namespace gui

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

#include "AutolockWindow.hpp"


@@ 60,7 60,7 @@ namespace gui
    void AutolockWindow::onBeforeShow(ShowMode mode, SwitchData *data)
    {
        currentAutoLockTimeout = autoLockSettings->getAutoLockTime();
        auto it = std::find_if(
        auto it                = std::find_if(
            autoLockTimes.begin(), autoLockTimes.end(), [&](const std::pair<std::string, std::chrono::seconds> &elem) {
                return elem.second == currentAutoLockTimeout;
            });

M module-apps/application-special-input/include/application-special-input/ApplicationSpecialInput.hpp => module-apps/application-special-input/include/application-special-input/ApplicationSpecialInput.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 35,7 35,8 @@ namespace app
        void destroyUserInterface() override;
    };

    template <> struct ManifestTraits<ApplicationSpecialInput>
    template <>
    struct ManifestTraits<ApplicationSpecialInput>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

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

#pragma once


@@ 28,7 28,7 @@ namespace gui
    {
      protected:
        void decorateActionActivated(Item *it, const std::string &str);
        GridLayout *box               = nullptr;
        GridLayout *box                     = nullptr;
        app::ApplicationCommon *application = nullptr;

      public:

M module-apps/application-test/include/application-test/ApplicationTest.hpp => module-apps/application-test/include/application-test/ApplicationTest.hpp +2 -1
@@ 46,7 46,8 @@ namespace app
        std::unique_ptr<gui::TestPresenter> presenter;
    };

    template <> struct ManifestTraits<ApplicationTest>
    template <>
    struct ManifestTraits<ApplicationTest>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M module-apps/apps-common/ApplicationCommon.hpp => module-apps/apps-common/ApplicationCommon.hpp +5 -3
@@ 98,9 98,11 @@ namespace app
    };

    /// Type traits pattern used to enforce user-defined types to implement "GetManifest" function.
    template <class T> struct ManifestTraits;
    template <class T>
    struct ManifestTraits;

    template <class, class = void> struct HasManifest : std::false_type
    template <class, class = void>
    struct HasManifest : std::false_type
    {};

    /// Checks whether T implements "GetManifest" static method.


@@ 186,7 188,7 @@ namespace app
        std::unique_ptr<gui::popup::Filter> popupFilter;
        std::unique_ptr<WindowsStack> windowsStackImpl;
        std::string default_window;
        State state = State::DEACTIVATED;
        State state        = State::DEACTIVATED;
        bool phoneIsLocked = false;

        sys::MessagePointer handleSignalStrengthUpdate(sys::Message *msgl);

M module-apps/apps-common/ApplicationCommonPopupBlueprints.cpp => module-apps/apps-common/ApplicationCommonPopupBlueprints.cpp +4 -4
@@ 47,10 47,10 @@ namespace app
                LOG_INFO("Playback: %s, volume: %s",
                         audio::str(volumeParams->getAudioContext().second).c_str(),
                         std::to_string(volumeParams->getVolume()).c_str());
                auto volume          = volumeParams->getVolume();
                auto context         = volumeParams->getAudioContext();
                auto source          = volumeParams->getRequestSource();
                auto popupData       = std::make_unique<gui::VolumePopupData>(volume, context, source);
                auto volume    = volumeParams->getVolume();
                auto context   = volumeParams->getAudioContext();
                auto source    = volumeParams->getRequestSource();
                auto popupData = std::make_unique<gui::VolumePopupData>(volume, context, source);

                const auto popupName = resolveWindowName(gui::popup::ID::Volume);
                if (const auto currentWindowName = getCurrentWindow()->getName(); currentWindowName == popupName) {

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

#pragma once


@@ 73,7 73,8 @@ namespace app
    };

    /// application launcher boilerplate
    template <class T> class ApplicationLauncherT : public ApplicationLauncher
    template <class T>
    class ApplicationLauncherT : public ApplicationLauncher
    {
      public:
        ApplicationLauncherT(std::string name, ApplicationManifest &&manifest, Closeable isCloseable = Closeable::True)

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

#pragma once


@@ 7,7 7,8 @@

namespace app
{
    template <typename VIEW> class BasePresenter
    template <typename VIEW>
    class BasePresenter
    {
      public:
        virtual ~BasePresenter() noexcept = default;

M module-apps/apps-common/DatabaseModel.hpp => module-apps/apps-common/DatabaseModel.hpp +4 -3
@@ 14,12 14,13 @@
namespace app
{

    template <class T> class DatabaseModel
    template <class T>
    class DatabaseModel
    {
      protected:
        ApplicationCommon *application = nullptr;
        unsigned int recordsCount = std::numeric_limits<unsigned int>::max();
        int modelIndex            = 0;
        unsigned int recordsCount      = std::numeric_limits<unsigned int>::max();
        int modelIndex                 = 0;
        std::vector<std::shared_ptr<T>> records;

      public:

M module-apps/apps-common/InternalModel.hpp => module-apps/apps-common/InternalModel.hpp +2 -1
@@ 9,7 9,8 @@
namespace app
{

    template <class T> class InternalModel
    template <class T>
    class InternalModel
    {

      protected:

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

#pragma once


@@ 20,10 20,10 @@ class AbstractSoundsPlayer
    using AudioStoppedCallback = std::function<void()>;

    virtual bool play(const std::string &path, AudioStoppedCallback cb = nullptr) = 0;
    virtual bool pause()                                                      = 0;
    virtual bool resume()                                                     = 0;
    virtual bool stop()                                                       = 0;
    virtual bool stop(audio::Token token)                                     = 0;
    virtual bool isInState(State state) const noexcept                        = 0;
    virtual bool previouslyPlayed(const std::string &filePath) const          = 0;
    virtual bool pause()                                                          = 0;
    virtual bool resume()                                                         = 0;
    virtual bool stop()                                                           = 0;
    virtual bool stop(audio::Token token)                                         = 0;
    virtual bool isInState(State state) const noexcept                            = 0;
    virtual bool previouslyPlayed(const std::string &filePath) const              = 0;
};

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

#include "SoundsPlayer.hpp"


@@ 17,9 17,9 @@ bool SoundsPlayer::play(const std::string &path, AudioStoppedCallback cb)
                      token.IsValid());
            return;
        }
        currentState = State::Playing;
        currentToken = token;
        currentPath  = path;
        currentState         = State::Playing;
        currentToken         = token;
        currentPath          = path;
        audioStoppedCallback = cb;
    });
}

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

#pragma once


@@ 9,7 9,8 @@
#include <vector>
#include <functional>

template <> struct std::hash<std::vector<unsigned int>>
template <>
struct std::hash<std::vector<unsigned int>>
{
    const static unsigned int digit_multiplier = 10;
    uint32_t operator()(std::vector<unsigned int> const &input) const noexcept

M module-apps/apps-common/notifications/NotificationProvider.hpp => module-apps/apps-common/notifications/NotificationProvider.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 29,7 29,8 @@ namespace notifications

    class NotificationProvider
    {
        template <NotificationType type, typename T> bool handleNotSeenWithCounter(NotificationsRecord &&record);
        template <NotificationType type, typename T>
        bool handleNotSeenWithCounter(NotificationsRecord &&record);

      public:
        explicit NotificationProvider(sys::Service *ownerService, NotificationsConfiguration &notifcationConfig);

M module-apps/apps-common/notifications/NotificationsModel.cpp => module-apps/apps-common/notifications/NotificationsModel.cpp +0 -1
@@ 89,7 89,6 @@ void NotificationsModel::updateData(app::manager::actions::NotificationsChangedP
    notificationsPresenter->updateData(params, callAndSMSVisibility);
}


bool NotificationsModel::isTetheringOn() const noexcept
{
    return tetheringOn;

M module-apps/apps-common/notifications/NotificationsModel.hpp => module-apps/apps-common/notifications/NotificationsModel.hpp +1 -1
@@ 18,7 18,7 @@ namespace gui
    {
      private:
        std::shared_ptr<NotificationsPresenter> notificationsPresenter;
        bool tetheringOn = false;
        bool tetheringOn   = false;
        bool phoneTimeLock = false;
        const NotificationsListPlacement listPlacement;


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

#pragma once


@@ 44,14 44,14 @@ namespace gui::option

    namespace window
    {
        inline constexpr gui::Length option_left_margin       = 10;
        inline constexpr gui::Length option_right_margin      = 10;
        inline constexpr gui::Length option_bottom_margin     = style::margins::big;
        inline constexpr uint32_t optionsListTopMargin        = 10U;
        inline constexpr uint32_t optionsListX                = style::window::default_left_margin;
        inline constexpr uint32_t optionsListY = style::window::default_vertical_pos + optionsListTopMargin;
        inline constexpr uint32_t optionsListW                = style::listview::body_width_with_scroll;
        inline constexpr uint32_t optionsListH                = style::window::default_body_height;
        inline constexpr gui::Length option_left_margin   = 10;
        inline constexpr gui::Length option_right_margin  = 10;
        inline constexpr gui::Length option_bottom_margin = style::margins::big;
        inline constexpr uint32_t optionsListTopMargin    = 10U;
        inline constexpr uint32_t optionsListX            = style::window::default_left_margin;
        inline constexpr uint32_t optionsListY            = style::window::default_vertical_pos + optionsListTopMargin;
        inline constexpr uint32_t optionsListW            = style::listview::body_width_with_scroll;
        inline constexpr uint32_t optionsListH            = style::window::default_body_height;
    } // namespace window

} // namespace gui::option

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

#include "OptionsList.hpp"


@@ 10,12 10,14 @@ namespace gui
        : optionsModel{std::move(model)}, options(std::move(options))
    {}

    template <class ListType> void OptionsList<ListType>::createOptions()
    template <class ListType>
    void OptionsList<ListType>::createOptions()
    {
        optionsModel->createData(options);
    }

    template <class ListType> void OptionsList<ListType>::refreshOptions(std::list<Option> &&optionList)
    template <class ListType>
    void OptionsList<ListType>::refreshOptions(std::list<Option> &&optionList)
    {
        options = std::move(optionList);
        optionsList->rebuildList(listview::RebuildType::InPlace);


@@ 28,7 30,8 @@ namespace gui
        optionsList->rebuildList(listview::RebuildType::OnPageElement, pageIndex);
    }

    template <class ListType> void OptionsList<ListType>::addOptions(std::list<Option> &&optionList)
    template <class ListType>
    void OptionsList<ListType>::addOptions(std::list<Option> &&optionList)
    {
        options = std::move(optionList);
        createOptions();


@@ 36,19 39,22 @@ namespace gui
        optionsList->rebuildList();
    }

    template <class ListType> void OptionsList<ListType>::changeOptions(std::list<Option> &&optionList)
    template <class ListType>
    void OptionsList<ListType>::changeOptions(std::list<Option> &&optionList)
    {
        clearOptions();
        addOptions(std::move(optionList));
    }

    template <class ListType> void OptionsList<ListType>::recreateOptions()
    template <class ListType>
    void OptionsList<ListType>::recreateOptions()
    {
        clearOptions();
        createOptions();
    }

    template <class ListType> void OptionsList<ListType>::clearOptions()
    template <class ListType>
    void OptionsList<ListType>::clearOptions()
    {
        optionsList->clear();
        optionsModel->clearData();

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

#pragma once


@@ 11,7 11,8 @@

namespace gui
{
    template <class ListType> class OptionsList
    template <class ListType>
    class OptionsList
    {
      protected:
        explicit OptionsList(std::shared_ptr<OptionsModel>(app), std::list<Option> = {});

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

#pragma once


@@ 56,7 56,7 @@ namespace gui
        virtual void showSnoozeButton() override;

      private:
        VBox *body = nullptr;
        VBox *body                         = nullptr;
        gui::TextFixedSize *alarmTimeLabel = nullptr;
        gui::TextFixedSize *snoozeLabel    = nullptr;
        SnoozeShow snoozeShow              = SnoozeShow::First;

M module-apps/apps-common/popups/VolumeWindow.hpp => module-apps/apps-common/popups/VolumeWindow.hpp +5 -5
@@ 13,12 13,12 @@

namespace style::window::volume
{
    constexpr inline auto title_height    = 33;
    constexpr inline auto base_title_key  = "app_popup_volume_text";
    constexpr inline auto title_height       = 33;
    constexpr inline auto base_title_key     = "app_popup_volume_text";
    constexpr inline auto bt_audio_title_key = "app_popup_bt_volume_text";
    constexpr inline auto music_title_key = "app_popup_music_volume_text";
    constexpr inline auto call_title_key  = "app_popup_call_volume_text";
    constexpr inline auto mute_title_key  = "app_popup_muted_text";
    constexpr inline auto music_title_key    = "app_popup_music_volume_text";
    constexpr inline auto call_title_key     = "app_popup_call_volume_text";
    constexpr inline auto mute_title_key     = "app_popup_muted_text";

    namespace bar
    {

M module-apps/apps-common/popups/lock-popups/phone-lock-wallpapers/WallpaperBase.hpp => module-apps/apps-common/popups/lock-popups/phone-lock-wallpapers/WallpaperBase.hpp +2 -2
@@ 15,8 15,8 @@ namespace gui

      public:
        explicit WallpaperBase(Item *parent);
        virtual void show()  = 0;
        virtual void hide()  = 0;
        virtual void show()                                                         = 0;
        virtual void hide()                                                         = 0;
        virtual std::shared_ptr<NotificationsPresenter> getNotificationsPresenter() = 0;
    };


M module-apps/apps-common/popups/lock-popups/phone-lock-wallpapers/WallpaperClock.hpp => module-apps/apps-common/popups/lock-popups/phone-lock-wallpapers/WallpaperClock.hpp +2 -2
@@ 13,8 13,8 @@ namespace gui
    class WallpaperClock : public WallpaperBase
    {
      private:
        gui::ClockDateWidget *clockDate                             = nullptr;
        gui::ListView *notificationsList                            = nullptr;
        gui::ClockDateWidget *clockDate  = nullptr;
        gui::ListView *notificationsList = nullptr;
        std::shared_ptr<gui::NotificationsListPresenter> notificationsListPresenter;

      public:

M module-apps/apps-common/popups/presenter/AlarmPresenter.cpp => module-apps/apps-common/popups/presenter/AlarmPresenter.cpp +6 -4
@@ 38,13 38,14 @@ namespace app::popup

    auto async = app::AsyncRequest::createFromMessage;

    template <typename requestType, typename responseType> void AlarmPopupContract::AlarmModel::snoozeAlarm()
    template <typename requestType, typename responseType>
    void AlarmPopupContract::AlarmModel::snoozeAlarm()
    {
        auto request = std::make_unique<requestType>(record->ID,
                                                     std::chrono::floor<std::chrono::minutes>(TimePointNow()) +
                                                         std::chrono::minutes(record->snoozeDuration));
        auto task = async(std::move(request), service::name::service_time);
        auto cb   = [&](auto response) {
        auto task    = async(std::move(request), service::name::service_time);
        auto cb      = [&](auto response) {
            auto result = dynamic_cast<responseType *>(response);
            assert(result);
            assert(result->success);


@@ 57,7 58,8 @@ namespace app::popup
        task->execute(app, this, cb);
    }

    template <typename requestType, typename responseType> void AlarmPopupContract::AlarmModel::stopAlarm()
    template <typename requestType, typename responseType>
    void AlarmPopupContract::AlarmModel::stopAlarm()
    {
        auto request = std::make_unique<requestType>(record->ID);
        auto task    = async(std::move(request), service::name::service_time);

M module-apps/apps-common/popups/presenter/AlarmPresenter.hpp => module-apps/apps-common/popups/presenter/AlarmPresenter.hpp +5 -3
@@ 27,14 27,16 @@ namespace app::popup
            void set(std::shared_ptr<AlarmEventRecord> record);
            void setSnoozed(std::vector<SingleEventRecord> snoozed);
            void reset();
            template <typename requestType, typename responseType> void snoozeAlarm();
            template <typename requestType, typename responseType> void stopAlarm();
            template <typename requestType, typename responseType>
            void snoozeAlarm();
            template <typename requestType, typename responseType>
            void stopAlarm();
            void setRefreshWindowCallback(std::function<void()> callback);
            void processIfSnoozed();

            std::shared_ptr<AlarmEventRecord> record = nullptr;
            std::vector<SingleEventRecord> snoozedRecord;
            Presenter *presenter                     = nullptr;
            Presenter *presenter                        = nullptr;
            std::function<void()> refreshWindowCallback = nullptr;
            std::string snoozedTill                     = std::string{};
            bool isSnoozedAlarm                         = false;

M module-apps/apps-common/popups/presenter/PowerOffPresenter.hpp => module-apps/apps-common/popups/presenter/PowerOffPresenter.hpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 15,9 15,9 @@ namespace gui
    class AbstractPowerOffPresenter
    {
      public:
        virtual ~AbstractPowerOffPresenter() = default;
        virtual ~AbstractPowerOffPresenter()                                                = default;
        virtual void powerOff(sys::CloseReason reason = sys::CloseReason::RegularPowerDown) = 0;
        virtual void reboot()                = 0;
        virtual void reboot()                                                               = 0;
    };

    class PowerOffPresenter : public AbstractPowerOffPresenter

M module-apps/apps-common/popups/presenter/QuotesPresenter.cpp => module-apps/apps-common/popups/presenter/QuotesPresenter.cpp +2 -2
@@ 15,8 15,8 @@ namespace gui

    void QuotesPresenter::requestQuote()
    {
        auto query             = std::make_unique<Quotes::Messages::ReadRandomizedQuoteRequest>();
        auto task              = app::AsyncQuery::createFromQuery(std::move(query), db::Interface::Name::Quotes);
        auto query = std::make_unique<Quotes::Messages::ReadRandomizedQuoteRequest>();
        auto task  = app::AsyncQuery::createFromQuery(std::move(query), db::Interface::Name::Quotes);
        task->setCallback([this](auto response) { return onQuoteRetreived(response); });
        task->execute(application, this);
    }

M module-apps/apps-common/widgets/spinners/ItemSpinner.hpp => module-apps/apps-common/widgets/spinners/ItemSpinner.hpp +26 -13
@@ 8,7 8,8 @@

namespace gui
{
    template <typename Container> class ItemSpinner : public Item
    template <typename Container>
    class ItemSpinner : public Item
    {
      public:
        using range      = typename Container::range;


@@ 69,18 70,21 @@ namespace gui
        }
    }

    template <typename Container> void ItemSpinner<Container>::setFocusEdges(RectangleEdge edges)
    template <typename Container>
    void ItemSpinner<Container>::setFocusEdges(RectangleEdge edges)
    {
        focusEdges = edges;
    }

    template <typename Container> void ItemSpinner<Container>::setRange(range range)
    template <typename Container>
    void ItemSpinner<Container>::setRange(range range)
    {
        container.updateRange(range);
        update();
    }

    template <typename Container> void ItemSpinner<Container>::setCurrentValue(const value_type val)
    template <typename Container>
    void ItemSpinner<Container>::setCurrentValue(const value_type val)
    {
        container.set(val);
        update();


@@ 92,19 96,22 @@ namespace gui
        return container.get();
    }

    template <typename Container> bool ItemSpinner<Container>::isPreviousEvent(const InputEvent &inputEvent)
    template <typename Container>
    bool ItemSpinner<Container>::isPreviousEvent(const InputEvent &inputEvent)
    {
        return (orientation == Orientation::Vertical && inputEvent.is(KeyCode::KEY_DOWN)) ||
               (orientation == Orientation::Horizontal && inputEvent.is(KeyCode::KEY_LEFT));
    }

    template <typename Container> bool ItemSpinner<Container>::isNextEvent(const InputEvent &inputEvent)
    template <typename Container>
    bool ItemSpinner<Container>::isNextEvent(const InputEvent &inputEvent)
    {
        return (orientation == Orientation::Vertical && inputEvent.is(KeyCode::KEY_UP)) ||
               (orientation == Orientation::Horizontal && inputEvent.is(KeyCode::KEY_RIGHT));
    }

    template <typename Container> bool ItemSpinner<Container>::onInput(const InputEvent &inputEvent)
    template <typename Container>
    bool ItemSpinner<Container>::onInput(const InputEvent &inputEvent)
    {
        if (inputEvent.isShortRelease()) {
            if (isPreviousEvent(inputEvent)) {


@@ 119,7 126,8 @@ namespace gui
        return false;
    }

    template <typename Container> void ItemSpinner<Container>::stepNext()
    template <typename Container>
    void ItemSpinner<Container>::stepNext()
    {
        if (container.next()) {
            update();


@@ 127,7 135,8 @@ namespace gui
        }
    }

    template <typename Container> void ItemSpinner<Container>::stepPrevious()
    template <typename Container>
    void ItemSpinner<Container>::stepPrevious()
    {
        if (container.previous()) {
            update();


@@ 135,7 144,8 @@ namespace gui
        }
    }

    template <typename Container> void ItemSpinner<Container>::update()
    template <typename Container>
    void ItemSpinner<Container>::update()
    {
        if (currentLayout != nullptr) {
            this->removeWidget(currentLayout);


@@ 144,17 154,20 @@ namespace gui
        this->addWidget(currentLayout);
        informContentChanged();
    }
    template <typename Container> void ItemSpinner<Container>::invoke()
    template <typename Container>
    void ItemSpinner<Container>::invoke()
    {
        if (onValueChanged) {
            onValueChanged(getCurrentValue());
        }
    }
    template <typename Container> bool ItemSpinner<Container>::isAtMin() const
    template <typename Container>
    bool ItemSpinner<Container>::isAtMin() const
    {
        return container.is_min();
    }
    template <typename Container> bool ItemSpinner<Container>::isAtMax() const
    template <typename Container>
    bool ItemSpinner<Container>::isAtMax() const
    {
        return container.is_max();
    }

M module-apps/apps-common/widgets/spinners/Model.hpp => module-apps/apps-common/widgets/spinners/Model.hpp +2 -1
@@ 14,7 14,8 @@
/// Sometimes it is necessary to force the latter way of storing values even for fundamental types. For
/// instance, the user might want to store a fixed list of integers to iterate. In that case, set the force parameter to
/// true.
template <class ElementType, bool force = false, typename = void> class Model
template <class ElementType, bool force = false, typename = void>
class Model
{
  public:
    enum class Boundaries

M module-apps/apps-common/widgets/spinners/Spinners.hpp => module-apps/apps-common/widgets/spinners/Spinners.hpp +4 -2
@@ 11,7 11,8 @@

namespace gui
{
    template <typename ValType, size_t Width> struct FixedIntegerFormatter
    template <typename ValType, size_t Width>
    struct FixedIntegerFormatter
    {
        std::string operator()(const ValType val) const
        {


@@ 28,6 29,7 @@ namespace gui
    using UIntegerSpinner      = StringOutputSpinner<UINT8Container>;
    using UIntegerSpinnerFixed = StringOutputSpinner<UINT8Container, FixedIntegerFormatter<std::uint32_t, 2>>;
    using WidgetSpinner        = ItemSpinner<Model<Item *>>;
    template <typename T> using UIntegerSpinnerWithFormatter = StringOutputSpinner<UINT8Container, T>;
    template <typename T>
    using UIntegerSpinnerWithFormatter = StringOutputSpinner<UINT8Container, T>;

} // namespace gui

M module-apps/apps-common/widgets/spinners/StringOutputSpinner.hpp => module-apps/apps-common/widgets/spinners/StringOutputSpinner.hpp +24 -12
@@ 10,17 10,20 @@

namespace details
{
    template <typename T, typename = void> struct container_data
    template <typename T, typename = void>
    struct container_data
    {
        using value = T;
    };

    template <typename T> struct container_data<T, std::enable_if_t<not std::is_fundamental_v<T>>>
    template <typename T>
    struct container_data<T, std::enable_if_t<not std::is_fundamental_v<T>>>
    {
        using value = typename T::value_type;
    };

    template <class T> using container_data_v = typename container_data<T>::value;
    template <class T>
    using container_data_v = typename container_data<T>::value;

} // namespace details



@@ 30,7 33,8 @@ namespace gui
    // For the containers of types that are convertible to strings like std::string, integer, floating-point integers,
    // there is no need to provide the custom formatter. However, it is possible to pass a formatter if a user wants to
    // perform custom formatting. It is not possible to use a formatter when using container of std::string.
    template <typename Container, typename Formatter = void> class StringOutputSpinner : public TextFixedSize
    template <typename Container, typename Formatter = void>
    class StringOutputSpinner : public TextFixedSize
    {
      public:
        using range      = typename Container::range;


@@ 157,17 161,20 @@ namespace gui
        return true;
    }

    template <typename Container, typename Formatter> size_t StringOutputSpinner<Container, Formatter>::size() const
    template <typename Container, typename Formatter>
    size_t StringOutputSpinner<Container, Formatter>::size() const
    {
        return container.size();
    }

    template <typename Container, typename Formatter> bool StringOutputSpinner<Container, Formatter>::is_min() const
    template <typename Container, typename Formatter>
    bool StringOutputSpinner<Container, Formatter>::is_min() const
    {
        return container.is_min();
    }

    template <typename Container, typename Formatter> bool StringOutputSpinner<Container, Formatter>::is_max() const
    template <typename Container, typename Formatter>
    bool StringOutputSpinner<Container, Formatter>::is_max() const
    {
        return container.is_max();
    }


@@ 186,7 193,8 @@ namespace gui
        update();
    }

    template <typename Container, typename Formatter> void StringOutputSpinner<Container, Formatter>::next()
    template <typename Container, typename Formatter>
    void StringOutputSpinner<Container, Formatter>::next()
    {
        if (container.next()) {
            update();


@@ 194,19 202,22 @@ namespace gui
        }
    }

    template <typename Container, typename Formatter> void StringOutputSpinner<Container, Formatter>::previous()
    template <typename Container, typename Formatter>
    void StringOutputSpinner<Container, Formatter>::previous()
    {
        if (container.previous()) {
            update();
            invoke();
        }
    }
    template <typename Container, typename Formatter> void StringOutputSpinner<Container, Formatter>::update()
    template <typename Container, typename Formatter>
    void StringOutputSpinner<Container, Formatter>::update()
    {
        setText(value_as_str());
    }

    template <typename Container, typename Formatter> void StringOutputSpinner<Container, Formatter>::invoke()
    template <typename Container, typename Formatter>
    void StringOutputSpinner<Container, Formatter>::invoke()
    {
        if (onValueChanged) {
            onValueChanged(value());


@@ 227,7 238,8 @@ namespace gui
               (orientation == Orientation::Horizontal && inputEvent.is(KeyCode::KEY_RIGHT));
    }

    template <typename Container, typename Formatter> void StringOutputSpinner<Container, Formatter>::init()
    template <typename Container, typename Formatter>
    void StringOutputSpinner<Container, Formatter>::init()
    {
        setEditMode(EditMode::Browse);
        drawUnderline(false);

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

#include "Dialog.hpp"


@@ 153,7 153,7 @@ void DialogRetry::onBeforeShow(ShowMode mode, SwitchData *data)
{
    if (auto metadata = dynamic_cast<DialogMetadataMessage *>(data); metadata != nullptr) {
        Dialog::onBeforeShow(mode, metadata);
        auto foo                     = metadata->get().action;
        navBar->activatedCallback    = [foo](Item &) -> bool { return foo(); };
        auto foo                  = metadata->get().action;
        navBar->activatedCallback = [foo](Item &) -> bool { return foo(); };
    }
}

M module-apps/tests/widgets/test-DigitsContainer.cpp => module-apps/tests/widgets/test-DigitsContainer.cpp +2 -1
@@ 28,7 28,8 @@ namespace
        EXPECT_TRUE(text.empty());
    }

    template <size_t N> auto initContainer(gui::HBox &box) -> gui::DigitsContainer
    template <size_t N>
    auto initContainer(gui::HBox &box) -> gui::DigitsContainer
    {
        auto container = gui::DigitsContainer{N};
        for (auto &digit : container.digits) {

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

#pragma once


@@ 60,4 60,3 @@ namespace audio
    };

} // namespace audio


M module-audio/Audio/Operation/Operation.hpp => module-audio/Audio/Operation/Operation.hpp +0 -1
@@ 14,7 14,6 @@
#include "Audio/encoder/Encoder.hpp"
#include "Audio/Profiles/Profile.hpp"


namespace audio
{
    class Operation

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

#pragma once


@@ 138,7 138,8 @@ namespace audio

namespace std
{
    template <> struct iterator_traits<audio::Stream::RawBlockIterator>
    template <>
    struct iterator_traits<audio::Stream::RawBlockIterator>
    {
        using iterator_category = std::forward_iterator_tag;
        using value_type        = audio::Stream::Span;

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

#pragma once


@@ 24,4 24,3 @@ typedef struct
 * @return 1 if success, otherwise 0.
 */
uint8_t parseXingHeader(uint8_t *data, size_t datasize, xing_info_t *info);


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

#pragma once


@@ 44,4 44,3 @@ namespace audio
    };

} // namespace audio


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

#pragma once


@@ 24,7 24,8 @@ namespace audio::transcode
     * @tparam Ratio - order of the decimator; e.g.: for Ratio = 4 drops 3 sample for each block of 4
     * reducing sample rate by the factor of 4.
     */
    template <typename SampleType, unsigned int Channels, unsigned int Ratio> class BasicDecimator : public Transform
    template <typename SampleType, unsigned int Channels, unsigned int Ratio>
    class BasicDecimator : public Transform
    {
        static_assert(Channels == 1 || Channels == 2);
        static_assert(std::is_integral<SampleType>::value);


@@ 33,8 34,9 @@ namespace audio::transcode
        /**
         * @brief Integer type to be used to read and write data from/to a buffer.
         */
        using IntegerType = typename decltype(
            utils::integer::getIntegerType<sizeof(SampleType) * utils::integer::BitsInByte * Channels>())::type;
        using IntegerType =
            typename decltype(utils::integer::getIntegerType<sizeof(SampleType) * utils::integer::BitsInByte *
                                                             Channels>())::type;

      public:
        auto transformBlockSize(std::size_t blockSize) const noexcept -> std::size_t override

M module-audio/Audio/transcode/BasicInterpolator.hpp => module-audio/Audio/transcode/BasicInterpolator.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 25,7 25,8 @@ namespace audio::transcode
     * @tparam Ratio - order of the interpolator; e.g.: for Ratio = 4 repeats first sample 3
     * times for each block of 4 increasing sample rate by the factor of 4.
     */
    template <typename SampleType, unsigned int Channels, unsigned int Ratio> class BasicInterpolator : public Transform
    template <typename SampleType, unsigned int Channels, unsigned int Ratio>
    class BasicInterpolator : public Transform
    {
        static_assert(Channels == 1 || Channels == 2);
        static_assert(std::is_integral<SampleType>::value);

M module-audio/board/rt1051/puretx/PureTxAudioCodec.cpp => module-audio/board/rt1051/puretx/PureTxAudioCodec.cpp +4 -4
@@ 104,10 104,10 @@ namespace audio
            LOG_ERROR("Unsupported sample rate");
        }

        codecParams.inputPath  = getCodecInputPath(currentFormat);
        codecParams.outputPath = getCodecOutputPath(currentFormat);
        codecParams.outVolume  = currentFormat.outputVolume;
        codecParams.inGain     = currentFormat.inputGain;
        codecParams.inputPath         = getCodecInputPath(currentFormat);
        codecParams.outputPath        = getCodecOutputPath(currentFormat);
        codecParams.outVolume         = currentFormat.outputVolume;
        codecParams.inGain            = currentFormat.inputGain;
        codecParams.playbackPathGain  = currentFormat.playbackPathGain;
        codecParams.playbackPathAtten = currentFormat.playbackPathAtten;
        SetupEQ();

M module-bluetooth/Bluetooth/BluetoothWorker.cpp => module-bluetooth/Bluetooth/BluetoothWorker.cpp +1 -2
@@ 267,8 267,7 @@ void BluetoothWorker::closeWorker()
}

void BluetoothWorker::removeFromBoundDevices(uint8_t *addr)
{
}
{}

void BluetoothWorker::setAudioDevice(std::shared_ptr<bluetooth::BluetoothAudioDevice> device)
{

M module-bluetooth/Bluetooth/BtKeysStorage.hpp => module-bluetooth/Bluetooth/BtKeysStorage.hpp +2 -1
@@ 17,6 17,7 @@ namespace bluetooth
      public:
        static auto getKeyStorage() -> btstack_link_key_db_t *;
        static std::shared_ptr<bluetooth::SettingsHolder> settings;

      private:
        static void openStorage();
        static void closeStorage();


@@ 37,4 38,4 @@ namespace bluetooth
        static json11::Json::array keys;
    };

} // namespace Bt
} // namespace bluetooth

M module-bluetooth/Bluetooth/CommandHandler.hpp => module-bluetooth/Bluetooth/CommandHandler.hpp +9 -9
@@ 16,7 16,7 @@ namespace sys
{
    class Service;
    class Message;
}
} // namespace sys

namespace bluetooth
{


@@ 27,14 27,14 @@ namespace bluetooth
      public:
        virtual ~AbstractCommandHandler() noexcept = default;

        virtual Error::Code scan()                                            = 0;
        virtual Error::Code stopScan()                                        = 0;
        virtual Error::Code setVisibility(bool visibility)                    = 0;
        virtual Error::Code connect(const DataVariant &data)                  = 0;
        virtual Error::Code disconnect()                                      = 0;
        virtual Error::Code pair(const DataVariant &data)                     = 0;
        virtual Error::Code unpair(const DataVariant &data)                   = 0;
        virtual Error::Code availableDevices()                                = 0;
        virtual Error::Code scan()                           = 0;
        virtual Error::Code stopScan()                       = 0;
        virtual Error::Code setVisibility(bool visibility)   = 0;
        virtual Error::Code connect(const DataVariant &data) = 0;
        virtual Error::Code disconnect()                     = 0;
        virtual Error::Code pair(const DataVariant &data)    = 0;
        virtual Error::Code unpair(const DataVariant &data)  = 0;
        virtual Error::Code availableDevices()               = 0;
    };

    class CommandHandler : public AbstractCommandHandler

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

#pragma once


@@ 24,5 24,5 @@ namespace bluetooth
        {}
    };

} // namespace Bt
} // namespace bluetooth
const char *c_str(bluetooth::Error::Code code);

M module-bluetooth/Bluetooth/WorkerController.cpp => module-bluetooth/Bluetooth/WorkerController.cpp +1 -2
@@ 13,8 13,7 @@ namespace bluetooth
                                           std::shared_ptr<std::vector<Devicei>> pairedDevices,
                                           std::shared_ptr<bluetooth::BaseProfileManager> profileManager)
        : pimpl(std::make_unique<Impl>(driver, handler, registerDevice, settings, pairedDevices, profileManager))
    {
    }
    {}

    StatefulController::StatefulController(StatefulController &&other) noexcept
    {

M module-bluetooth/Bluetooth/command/Command.cpp => module-bluetooth/Bluetooth/command/Command.cpp +1 -2
@@ 5,5 5,4 @@
#include <log/log.hpp>

namespace bluetooth
{
} // namespace bluetooth
{} // namespace bluetooth

M module-bluetooth/Bluetooth/interface/profiles/A2DP/A2DP.cpp => module-bluetooth/Bluetooth/interface/profiles/A2DP/A2DP.cpp +5 -5
@@ 172,7 172,7 @@ namespace bluetooth

        // setup AVRCP Controller
        AVRCP::sdpControllerServiceBuffer.fill(0);
        uint16_t controllerSupportedFeatures = AVRCP_FEATURE_MASK_CATEGORY_MONITOR_OR_AMPLIFIER;
        std::uint16_t controllerSupportedFeatures = AVRCP_FEATURE_MASK_CATEGORY_MONITOR_OR_AMPLIFIER;
        avrcp_controller_create_sdp_record(AVRCP::sdpControllerServiceBuffer.data(),
                                           avrcpControllerSdpRecordHandle,
                                           controllerSupportedFeatures,


@@ 194,8 194,8 @@ namespace bluetooth

    void A2DP::A2DPImpl::sendMediaPacket()
    {
        int numBytesInFrame = btstack_sbc_encoder_sbc_buffer_length();
        int bytesInStorage  = AVRCP::mediaTracker.sbc_storage_count;
        int numBytesInFrame    = btstack_sbc_encoder_sbc_buffer_length();
        int bytesInStorage     = AVRCP::mediaTracker.sbc_storage_count;
        std::uint8_t numFrames = bytesInStorage / numBytesInFrame;
        a2dp_source_stream_send_media_payload(AVRCP::mediaTracker.a2dp_cid,
                                              AVRCP::mediaTracker.local_seid,


@@ 324,8 324,8 @@ namespace bluetooth
            LOG_INFO("A2DP Source: Connected, a2dp cid 0x%02x, local seid %d.\n",
                     AVRCP::mediaTracker.a2dp_cid,
                     AVRCP::mediaTracker.local_seid);
            isConnected    = true;
            auto &busProxy = const_cast<sys::Service *>(ownerService)->bus;
            isConnected        = true;
            auto &busProxy     = const_cast<sys::Service *>(ownerService)->bus;
            device.deviceState = DeviceState::ConnectedAudio;
            // handle proper device matching when connection was initiated by remote device
            a2dp_subevent_signaling_connection_established_get_bd_addr(packet, device.address);

M module-bluetooth/Bluetooth/interface/profiles/A2DP/AVDTP.cpp => module-bluetooth/Bluetooth/interface/profiles/A2DP/AVDTP.cpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "AVDTP.hpp"


@@ 21,4 21,4 @@ namespace bluetooth
        LOG_INFO("    - allocationMethod: %d", sbcConfig.allocationMethod);
        LOG_INFO("    - bitpool_value [%d, %d] ", sbcConfig.minBitpoolValue, sbcConfig.maxBitpoolValue);
    }
} // namespace Bt
} // namespace bluetooth

M module-bluetooth/Bluetooth/interface/profiles/A2DP/AVDTP.hpp => module-bluetooth/Bluetooth/interface/profiles/A2DP/AVDTP.hpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 37,4 37,4 @@ namespace bluetooth

        static void dumpSbcConfiguration();
    };
} // namespace Bt
} // namespace bluetooth

M module-bluetooth/Bluetooth/interface/profiles/A2DP/AVRCP.hpp => module-bluetooth/Bluetooth/interface/profiles/A2DP/AVRCP.hpp +1 -1
@@ 51,4 51,4 @@ namespace bluetooth
        static void controllerPacketHandler(uint8_t packetType, uint16_t channel, uint8_t *packet, uint16_t size);
        static void init(sys::Service *service);
    };
} // namespace Bt
} // namespace bluetooth

M module-bluetooth/Bluetooth/interface/profiles/GAP/GAP.cpp => module-bluetooth/Bluetooth/interface/profiles/GAP/GAP.cpp +2 -2
@@ 248,7 248,7 @@ namespace bluetooth
                break;
            }

            auto it   = devices().find(addr);
            auto it = devices().find(addr);
            if (it == devices().end()) {
                gap_remote_name_request(addr, PAGE_SCAN_MODE_STANDARD, 0);
                it = devices().put(addr);


@@ 261,7 261,7 @@ namespace bluetooth
            }

            auto code = hci_event_user_passkey_notification_get_numeric_value(packet);
            auto msg = std::make_shared<::message::bluetooth::RequestAuthenticate>(
            auto msg  = std::make_shared<::message::bluetooth::RequestAuthenticate>(
                *it,
                bluetooth::AuthenticateType::PairCancel,
                (code != 0) ? static_cast<std::optional<unsigned long>>(code) : std::nullopt);

M module-bluetooth/Bluetooth/interface/profiles/HFP/HFP.cpp => module-bluetooth/Bluetooth/interface/profiles/HFP/HFP.cpp +11 -12
@@ 143,13 143,13 @@ namespace bluetooth
    std::unique_ptr<AudioInterface> HFP::HFPImpl::audioInterface       = nullptr;
    const sys::Service *HFP::HFPImpl::ownerService;
    const std::string_view HFP::HFPImpl::agServiceName = "Mudita Pure HFP";
    SCOCodec HFP::HFPImpl::codec            = SCOCodec::CVSD;
    SCOCodec HFP::HFPImpl::codec                       = SCOCodec::CVSD;
    std::shared_ptr<CVSDAudioDevice> HFP::HFPImpl::audioDevice;

    int HFP::HFPImpl::memory_1_enabled = 1;
    btstack_packet_callback_registration_t HFP::HFPImpl::hci_event_callback_registration;
    int HFP::HFPImpl::ag_indicators_nr                  = 7;
    hfp_ag_indicator_t HFP::HFPImpl::ag_indicators[]    = {
    int HFP::HFPImpl::ag_indicators_nr               = 7;
    hfp_ag_indicator_t HFP::HFPImpl::ag_indicators[] = {
        // index, name, min range, max range, status, mandatory, enabled, status changed
        {1, "service", 0, 1, 1, 0, 0, 0},
        {2, "call", 0, 1, 0, 1, 1, 0},


@@ 158,10 158,10 @@ namespace bluetooth
        {5, "signal", 0, 4, 5, 0, 1, 0},
        {6, "roam", 0, 1, 0, 0, 1, 0},
        {7, "callheld", 0, 2, 0, 1, 1, 0}};
    int HFP::HFPImpl::call_hold_services_nr                                       = 5;
    const char *HFP::HFPImpl::call_hold_services[]                                = {"1", "1x", "2", "2x", "3"};
    int HFP::HFPImpl::hf_indicators_nr                                            = 2;
    hfp_generic_status_indicator_t HFP::HFPImpl::hf_indicators[]                  = {
    int HFP::HFPImpl::call_hold_services_nr                      = 5;
    const char *HFP::HFPImpl::call_hold_services[]               = {"1", "1x", "2", "2x", "3"};
    int HFP::HFPImpl::hf_indicators_nr                           = 2;
    hfp_generic_status_indicator_t HFP::HFPImpl::hf_indicators[] = {
        {1, 1},
        {2, 1},
    };


@@ 268,7 268,7 @@ namespace bluetooth
            break;
        case HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED:
            LOG_DEBUG("Service level connection released.\n");
            aclHandle   = HCI_CON_HANDLE_INVALID;
            aclHandle = HCI_CON_HANDLE_INVALID;
            sendAudioEvent(audio::EventType::BlutoothHFPDeviceState, audio::Event::DeviceState::Disconnected);
            {
                auto &busProxy = const_cast<sys::Service *>(ownerService)->bus;


@@ 368,12 368,12 @@ namespace bluetooth
        Profile::initSdp();

        serviceBuffer.fill(0);
        uint16_t supported_features                = (1 << HFP_AGSF_ESCO_S4) | /* (1 << HFP_AGSF_HF_INDICATORS) | */
        uint16_t supported_features = (1 << HFP_AGSF_ESCO_S4) | /* (1 << HFP_AGSF_HF_INDICATORS) | */
                                      (1 << HFP_AGSF_CODEC_NEGOTIATION) | (1 << HFP_AGSF_EXTENDED_ERROR_RESULT_CODES) |
                                      (1 << HFP_AGSF_ENHANCED_CALL_CONTROL) | (1 << HFP_AGSF_ENHANCED_CALL_STATUS) |
                                      (1 << HFP_AGSF_ABILITY_TO_REJECT_A_CALL) /*| (1 << HFP_AGSF_IN_BAND_RING_TONE) |*/
            /* (1 << HFP_AGSF_VOICE_RECOGNITION_FUNCTION) |(1 << HFP_AGSF_THREE_WAY_CALLING)*/;
        int wide_band_speech = 0;
        int wide_band_speech                       = 0;
        constexpr std::uint8_t abilityToRejectCall = 1;
        hfp_ag_create_sdp_record(serviceBuffer.data(),
                                 hfpSdpRecordHandle,


@@ 457,8 457,7 @@ namespace bluetooth
        hfp_ag_init_codecs(codecsList.size(), reinterpret_cast<uint8_t *>(codecsList.data()));
    }
    void HFP::HFPImpl::initializeCall() const noexcept
    {
    }
    {}
    void HFP::HFPImpl::setAudioDevice(std::shared_ptr<bluetooth::BluetoothAudioDevice> audioDevice)
    {
        HFP::HFPImpl::audioDevice = std::static_pointer_cast<CVSDAudioDevice>(audioDevice);

M module-bluetooth/Bluetooth/interface/profiles/HSP/HSP.cpp => module-bluetooth/Bluetooth/interface/profiles/HSP/HSP.cpp +3 -3
@@ 97,9 97,9 @@ namespace bluetooth
    std::unique_ptr<AudioInterface> HSP::HSPImpl::audioInterface       = nullptr;
    const sys::Service *HSP::HSPImpl::ownerService;
    const std::string_view HSP::HSPImpl::agServiceName = "Mudita Pure HSP";
    bool HSP::HSPImpl::isConnected          = false;
    bool HSP::HSPImpl::callAnswered         = false;
    bool HSP::HSPImpl::isRinging            = false;
    bool HSP::HSPImpl::isConnected                     = false;
    bool HSP::HSPImpl::callAnswered                    = false;
    bool HSP::HSPImpl::isRinging                       = false;
    std::shared_ptr<CVSDAudioDevice> HSP::HSPImpl::audioDevice;
    Devicei HSP::HSPImpl::device;


M module-bluetooth/Bluetooth/interface/profiles/PhoneInterface.hpp => module-bluetooth/Bluetooth/interface/profiles/PhoneInterface.hpp +3 -3
@@ 11,9 11,9 @@ namespace bluetooth
    class CellularInterface
    {
      public:
        virtual ~CellularInterface()                           = default;
        virtual bool answerIncomingCall(sys::Service *service) = 0;
        virtual bool hangupCall(sys::Service *service)         = 0;
        virtual ~CellularInterface()                                              = default;
        virtual bool answerIncomingCall(sys::Service *service)                    = 0;
        virtual bool hangupCall(sys::Service *service)                            = 0;
        virtual bool sendDTMFCode(sys::Service *service, DTMFCode code)           = 0;
        virtual bool dialNumber(sys::Service *service, const std::string &number) = 0;
    };

M module-bluetooth/Bluetooth/interface/profiles/ProfileManager.hpp => module-bluetooth/Bluetooth/interface/profiles/ProfileManager.hpp +1 -1
@@ 81,6 81,6 @@ namespace bluetooth
        ProfileList profilesList;
        bluetooth::MusicProfile *musicProfilePtr = nullptr;
        bluetooth::CallProfile *callProfilePtr   = nullptr;
        bool initialized = false;
        bool initialized                         = false;
    };
} // namespace bluetooth

M module-bluetooth/Bluetooth/interface/profiles/SCO/ScoUtils.cpp => module-bluetooth/Bluetooth/interface/profiles/SCO/ScoUtils.cpp +2 -2
@@ 19,8 19,8 @@ namespace bluetooth::sco::utils
            return;
        }
        constexpr auto packetDataOffset = 3;
        constexpr auto lengthPosition = 2;
        const auto scoPacketLength    = hci_get_sco_packet_length();
        constexpr auto lengthPosition   = 2;
        const auto scoPacketLength      = hci_get_sco_packet_length();
        const auto scoPayloadLength     = scoPacketLength - packetDataOffset;

        hci_reserve_packet_buffer();

M module-bluetooth/tests/tests-StatefulController.cpp => module-bluetooth/tests/tests-StatefulController.cpp +2 -1
@@ 12,7 12,8 @@ auto InitializerMock = []() { return Error::Success; };

namespace mock
{
    template <typename T> auto mock_to_shared(T *val)
    template <typename T>
    auto mock_to_shared(T *val)
    {
        auto t = std::shared_ptr<T>(val, [](...) {});
        return t;

M module-bsp/WorkerQueue.hpp => module-bsp/WorkerQueue.hpp +8 -4
@@ 20,7 20,8 @@
 * It is not suitable for performing stack-consuming tasks, for instance handling I/O.
 * If necessary, stack size can be manually reconfigured upon creation.
 */
template <typename Message> class WorkerQueue
template <typename Message>
class WorkerQueue
{
    static constexpr auto minimalStackSizeInBytes = configMINIMAL_STACK_SIZE * sizeof(std::uint32_t);



@@ 71,7 72,8 @@ WorkerQueue<Message>::WorkerQueue(const char *name, WorkerHandle workerHandle, c
        &taskHandle);
}

template <typename Message> WorkerQueue<Message>::~WorkerQueue()
template <typename Message>
WorkerQueue<Message>::~WorkerQueue()
{
    if ((queueHandle != nullptr) && (taskHandle != nullptr)) {
        const InternalMessage killMsg{{}, true};


@@ 89,7 91,8 @@ template <typename Message> WorkerQueue<Message>::~WorkerQueue()
        vQueueDelete(queueHandle);
    }
}
template <typename Message> void WorkerQueue<Message>::worker()
template <typename Message>
void WorkerQueue<Message>::worker()
{
    while (true) {
        InternalMessage msg{};


@@ 104,7 107,8 @@ template <typename Message> void WorkerQueue<Message>::worker()
        }
    }
}
template <typename Message> BaseType_t WorkerQueue<Message>::post(const Message &msg)
template <typename Message>
BaseType_t WorkerQueue<Message>::post(const Message &msg)
{
    BaseType_t notifyRequired{};
    const InternalMessage postMsg{msg, false};

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

#include "bsp_bt.hpp"

namespace bsp
{

}; // namespace bsp
{}; // namespace bsp

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

#pragma once


@@ 11,6 11,4 @@
#include <memory>

namespace bsp
{

}; // namespace bsp
{}; // namespace bsp

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

#include <cstdint>


@@ 7,8 7,7 @@
namespace bsp::eeprom
{
    void init()
    {
    }
    {}

    bool isPresent(int busid)
    {

M module-bsp/board/linux/lpm/PowerProfile.cpp => module-bsp/board/linux/lpm/PowerProfile.cpp +6 -6
@@ 9,12 9,12 @@ namespace bsp
    {
        PowerProfile linuxPowerProfile;

        linuxPowerProfile.frequencyShiftLowerThreshold      = 40;
        linuxPowerProfile.frequencyShiftUpperThreshold      = 60;
        linuxPowerProfile.maxBelowThresholdCount            = 30;
        linuxPowerProfile.maxBelowThresholdInRowCount       = 10;
        linuxPowerProfile.maxAboveThresholdCount            = 3;
        linuxPowerProfile.minimalFrequency                  = CpuFrequencyMHz::Level_1;
        linuxPowerProfile.frequencyShiftLowerThreshold = 40;
        linuxPowerProfile.frequencyShiftUpperThreshold = 60;
        linuxPowerProfile.maxBelowThresholdCount       = 30;
        linuxPowerProfile.maxBelowThresholdInRowCount  = 10;
        linuxPowerProfile.maxAboveThresholdCount       = 3;
        linuxPowerProfile.minimalFrequency             = CpuFrequencyMHz::Level_1;

        return linuxPowerProfile;
    }

M module-bsp/board/rt1051/bellpx/bsp/lpm/PowerProfile.cpp => module-bsp/board/rt1051/bellpx/bsp/lpm/PowerProfile.cpp +6 -6
@@ 9,12 9,12 @@ namespace bsp
    {
        PowerProfile bellPowerProfile;

        bellPowerProfile.frequencyShiftLowerThreshold      = 50;
        bellPowerProfile.frequencyShiftUpperThreshold      = 80;
        bellPowerProfile.maxBelowThresholdCount            = 5;
        bellPowerProfile.maxBelowThresholdInRowCount       = 1;
        bellPowerProfile.maxAboveThresholdCount            = 2;
        bellPowerProfile.minimalFrequency                  = CpuFrequencyMHz::Level_0;
        bellPowerProfile.frequencyShiftLowerThreshold = 50;
        bellPowerProfile.frequencyShiftUpperThreshold = 80;
        bellPowerProfile.maxBelowThresholdCount       = 5;
        bellPowerProfile.maxBelowThresholdInRowCount  = 1;
        bellPowerProfile.maxAboveThresholdCount       = 2;
        bellPowerProfile.minimalFrequency             = CpuFrequencyMHz::Level_0;

        return bellPowerProfile;
    }

M module-bsp/board/rt1051/bellpx/bsp/rotary_encoder/rotary_encoder.cpp => module-bsp/board/rt1051/bellpx/bsp/rotary_encoder/rotary_encoder.cpp +2 -2
@@ 51,14 51,14 @@ namespace bsp::rotary_encoder

    void deinit()
    {
        gHandleIrq   = nullptr;
        gHandleIrq = nullptr;
        QTMR_DisableInterrupts(BOARD_QTMR_ID, BOARD_QTMR_ENC_CHANNEL, INTERRUPT_MODE);
        QTMR_Deinit(BOARD_QTMR_ID, BOARD_QTMR_ENC_CHANNEL);
    }

    std::vector<KeyEvent> getKeyEvents()
    {
        uint16_t tmp = QTMR_GetCurrentTimerCount(BOARD_QTMR_ID, BOARD_QTMR_ENC_CHANNEL);
        uint16_t tmp   = QTMR_GetCurrentTimerCount(BOARD_QTMR_ID, BOARD_QTMR_ENC_CHANNEL);
        auto direction = Direction::undefined;
        std::vector<KeyEvent> out;


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

#include "dma_config.h"


@@ 858,7 858,7 @@ EinkStatus_e EinkUpdateFrame(EinkFrame_t frame, uint8_t *buffer, EinkBpp_e bpp, 
        }
    }

    buf[0] = EinkDataStartTransmissionWindow;           // set display window
    buf[0] = EinkDataStartTransmissionWindow; // set display window
    buf[1] = static_cast<uint8_t>(hal::eink::getDisplayXAxis(frame) >>
                                  8); // MSB of the X axis in the EPD display. Value converted
                                      // from the standard GUI coords system to the ED028TC1 one

M module-bsp/board/rt1051/bsp/headset/headset.cpp => module-bsp/board/rt1051/bsp/headset/headset.cpp +1 -1
@@ 274,7 274,7 @@ namespace bsp

            qHandleIrq = qHandle;

            HeadsetInserted = false;
            HeadsetInserted    = false;
            MicrophoneInserted = false;

            // Set Insertion de-bounce time to 1s, enable auto-detection and manually trigger detection

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

#pragma once


@@ 45,8 45,8 @@ namespace bsp::keypad_backlight

    constexpr inline auto BOOST_OUTPUT_4V = 0x00;

    constexpr inline auto NSTDBY       = 0b10000000;
    constexpr inline auto BOOST_EN     = 0b01000000;
    constexpr inline auto NSTDBY                 = 0b10000000;
    constexpr inline auto BOOST_EN               = 0b01000000;
    constexpr inline auto FUNCTION_KEYS_PORTS_EN = NSTDBY | BOOST_EN | 0b00000110; // Only ports 2-3 active
    constexpr inline auto NUMERIC_KEYS_PORT_EN   = NSTDBY | BOOST_EN | 0b00001000; // Only port 4 active
    constexpr inline auto ALL_PORTS_EN           = FUNCTION_KEYS_PORTS_EN | NUMERIC_KEYS_PORT_EN; // ports 2-4 active

M module-bsp/board/rt1051/bsp/light_sensor/LTR303ALS.hpp => module-bsp/board/rt1051/bsp/light_sensor/LTR303ALS.hpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 30,7 30,7 @@ namespace bsp::light_sensor

    constexpr inline auto MEASUREMENT_GAIN_8 = 0b00001100;
    constexpr inline auto ACTIVE_MODE        = 0b00000001 | MEASUREMENT_GAIN_8;
    constexpr inline auto SW_RESET    = 0b00000010;
    constexpr inline auto SW_RESET           = 0b00000010;

    constexpr inline auto INTEGRATION_TIME_50MS  = 0b00001000;
    constexpr inline auto ALS_INT_50MS           = 0.5f;

M module-bsp/board/rt1051/puretx/bsp/battery_charger/battery_charger_utils.hpp => module-bsp/board/rt1051/puretx/bsp/battery_charger/battery_charger_utils.hpp +2 -1
@@ 7,7 7,8 @@

namespace bsp::battery_charger::utils
{
    template <typename T> int twosComplimentToInt(T toConvert)
    template <typename T>
    int twosComplimentToInt(T toConvert)
    {
        constexpr auto bitSize = sizeof(T) * 8;
        std::bitset<bitSize> bitset{toConvert};

M module-bsp/board/rt1051/puretx/bsp/lpm/PowerProfile.cpp => module-bsp/board/rt1051/puretx/bsp/lpm/PowerProfile.cpp +6 -6
@@ 9,12 9,12 @@ namespace bsp
    {
        PowerProfile purePowerProfile;

        purePowerProfile.frequencyShiftLowerThreshold      = 50;
        purePowerProfile.frequencyShiftUpperThreshold      = 80;
        purePowerProfile.maxBelowThresholdCount            = 5;
        purePowerProfile.maxBelowThresholdInRowCount       = 1;
        purePowerProfile.maxAboveThresholdCount            = 2;
        purePowerProfile.minimalFrequency                  = CpuFrequencyMHz::Level_0;
        purePowerProfile.frequencyShiftLowerThreshold = 50;
        purePowerProfile.frequencyShiftUpperThreshold = 80;
        purePowerProfile.maxBelowThresholdCount       = 5;
        purePowerProfile.maxBelowThresholdInRowCount  = 1;
        purePowerProfile.maxAboveThresholdCount       = 2;
        purePowerProfile.minimalFrequency             = CpuFrequencyMHz::Level_0;

        return purePowerProfile;
    }

M module-bsp/board/rt1051/puretx/irq_gpio.cpp => module-bsp/board/rt1051/puretx/irq_gpio.cpp +0 -1
@@ 18,7 18,6 @@
#include "bsp/magnetometer/magnetometer.hpp"
#include "bsp/light_sensor/light_sensor.hpp"


namespace bsp
{


M module-bsp/hal/include/hal/battery_charger/AbstractBatteryCharger.hpp => module-bsp/hal/include/hal/battery_charger/AbstractBatteryCharger.hpp +3 -3
@@ 47,9 47,9 @@ namespace hal::battery

        virtual ~AbstractBatteryCharger() = default;

        virtual Voltage getBatteryVoltage() const        = 0;
        virtual std::optional<SOC> getSOC() const        = 0;
        virtual ChargingStatus getChargingStatus() const = 0;
        virtual Voltage getBatteryVoltage() const          = 0;
        virtual std::optional<SOC> getSOC() const          = 0;
        virtual ChargingStatus getChargingStatus() const   = 0;
        virtual ChargerPresence getChargerPresence() const = 0;

        static_assert(sizeof(Events) == sizeof(std::uint8_t),

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

#pragma once


@@ 41,7 41,7 @@ namespace at
        Cmd(Cmd &&) noexcept       = default;
        auto operator=(const Cmd &) noexcept -> Cmd & = default;
        auto operator=(Cmd &&) noexcept -> Cmd & = default;
        virtual ~Cmd() = default;
        virtual ~Cmd()                           = default;

        auto setModifier(cmd::Modifier mod) noexcept
        {

M module-cellular/at/ErrorCode.hpp => module-cellular/at/ErrorCode.hpp +4 -2
@@ 116,13 116,15 @@ namespace at
 */
namespace magic_enum
{
    template <> struct customize::enum_range<at::NetworkErrorCode>
    template <>
    struct customize::enum_range<at::NetworkErrorCode>
    {
        static constexpr int min = 0;
        static constexpr int max = at::MAX_AT_ERROR_VALUE + 2;
    };

    template <> struct customize::enum_range<at::EquipmentErrorCode>
    template <>
    struct customize::enum_range<at::EquipmentErrorCode>
    {
        static constexpr int min = 0;
        static constexpr int max = at::MAX_AT_ERROR_VALUE + 2;

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

#pragma once


@@ 81,7 81,8 @@ namespace at
          protected:
            [[nodiscard]] static auto toBool(const std::string &text) -> bool;
            [[nodiscard]] static auto toUInt(const std::string &text) -> std::uint8_t;
            template <typename T>[[nodiscard]] static auto toEnum(const std::string &text) -> std::optional<T>;
            template <typename T>
            [[nodiscard]] static auto toEnum(const std::string &text) -> std::optional<T>;

          public:
            CLCC() noexcept;

M module-cellular/at/cmd/src/CLCC.cpp => module-cellular/at/cmd/src/CLCC.cpp +2 -1
@@ 34,7 34,8 @@ namespace at
            return static_cast<std::uint8_t>(value);
        }

        template <typename T> auto CLCC::toEnum(const std::string &text) -> std::optional<T>
        template <typename T>
        auto CLCC::toEnum(const std::string &text) -> std::optional<T>
        {
            static_assert(std::is_enum_v<T>);
            int ret = -1;

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

#include "response.hpp"


@@ 216,7 216,7 @@ namespace at
                auto pos = CSQstring.find(',');
                if (pos != std::string::npos) {
                    LOG_INFO("%s", CSQstring.c_str());
                    CSQstring = CSQstring.substr(0, pos);
                    CSQstring     = CSQstring.substr(0, pos);
                    int parsedVal = 0;
                    if (utils::toNumeric(CSQstring, parsedVal) && parsedVal >= 0) {
                        result = parsedVal;

M module-cellular/modem/ATStream.cpp => module-cellular/modem/ATStream.cpp +3 -3
@@ 99,13 99,13 @@ namespace at

    bool ATStream::checkATEnd()
    {
        auto pos = atBuffer.rfind(at::delimiter);
        auto pos                   = atBuffer.rfind(at::delimiter);
        const auto delimiterLength = std::strlen(at::delimiter);
        if (pos != std::string::npos) {
            auto pos2 = atBuffer.rfind(at::delimiter, pos - delimiterLength);
            if (pos2 != std::string::npos) {
                std::string rr = atBuffer.substr(pos2 + delimiterLength, pos - pos2 - delimiterLength);
                auto code = parseState(rr, errcode);
                auto code      = parseState(rr, errcode);
                if (code != Result::Code::NONE) {
                    result.code = code;
                    return true;


@@ 119,7 119,7 @@ namespace at
    void ATStream::countLines()
    {
        if (rxCount != 0) {
            auto pos = atBuffer.find(at::delimiter, lastPos);
            auto pos                   = atBuffer.find(at::delimiter, lastPos);
            const auto delimiterLength = std::strlen(at::delimiter);
            while (pos != std::string::npos) {
                /// do not count empty lines, see implementation of utils:split

M module-cellular/test/unittest_URC.cpp => module-cellular/test/unittest_URC.cpp +2 -1
@@ 26,7 26,8 @@
#include "SimState.hpp"
#include <at/SimInsertedState.hpp>

template <typename urcType> static auto getURC(std::unique_ptr<at::urc::Urc> &urc) -> std::shared_ptr<urcType>
template <typename urcType>
static auto getURC(std::unique_ptr<at::urc::Urc> &urc) -> std::shared_ptr<urcType>
{
    if (urc) {
        auto &rawUrc = *urc.get();

M module-cellular/test/unittest_parse_result.cpp => module-cellular/test/unittest_parse_result.cpp +2 -1
@@ 31,7 31,8 @@ namespace at::cmd
            return CLCC::toUInt(text);
        }

        template <typename T>[[nodiscard]] static auto toEnum(const std::string &text) -> std::optional<T>
        template <typename T>
        [[nodiscard]] static auto toEnum(const std::string &text) -> std::optional<T>
        {
            return CLCC::toEnum<T>(text);
        }

M module-db/Common/Query.hpp => module-db/Common/Query.hpp +1 -1
@@ 13,7 13,7 @@ namespace db
    using sdesktop::endpoints::PagedContext;

    class QueryResult; // Forward declaration
    using QueryCallbackFunction         = std::function<bool(db::QueryResult *)>;
    using QueryCallbackFunction                  = std::function<bool(db::QueryResult *)>;
    using EndpointQueryCallbackFunction          = std::function<bool(db::QueryResult *, Context &)>;
    using EndpointQueryCallbackFunctionWithPages = std::function<bool(db::QueryResult *, PagedContext &)>;
    class QueryListener

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

#pragma once


@@ 9,13 9,15 @@

namespace
{
    template <typename T> inline bool starts_with(const T &str, const T &start)
    template <typename T>
    inline bool starts_with(const T &str, const T &start)
    {
        if (start.size() > str.size())
            return false;
        return str.compare(0, start.size(), start) == 0;
    }
    template <typename T> inline bool ends_with(const T &str, const T &end)
    template <typename T>
    inline bool ends_with(const T &str, const T &end)
    {
        if (end.size() > str.size())
            return false;

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

#include "Field.hpp"


@@ 10,7 10,8 @@ const char *Field::getCString() const
    return mValue.c_str();
}

template <class T> static T lget(T &val, const std::string &mValue, std::function<T()> foo)
template <class T>
static T lget(T &val, const std::string &mValue, std::function<T()> foo)
{
    val = 0;
    if (mValue.empty()) {

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

#pragma once


@@ 6,7 6,8 @@
#include "../Database/Database.hpp"
#include "BaseInterface.hpp"

template <typename T, typename F> class RecordInterface : public db::Interface
template <typename T, typename F>
class RecordInterface : public db::Interface
{
  public:
    RecordInterface() = default;

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

#pragma once


@@ 26,8 26,8 @@ struct SMSRecord : public Record
    uint32_t date      = 0;
    uint32_t errorCode = 0;
    UTF8 body;
    SMSType type       = SMSType::UNKNOWN;
    uint32_t threadID  = 0;
    SMSType type      = SMSType::UNKNOWN;
    uint32_t threadID = 0;
    utils::PhoneNumber::View number;

    SMSRecord() = default;

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

#pragma once


@@ 19,8 19,8 @@ struct ThreadRecord : Record
    uint32_t msgCount       = 0;
    uint32_t unreadMsgCount = 0;
    UTF8 snippet;
    SMSType type       = SMSType::UNKNOWN;
    uint32_t numberID  = DB_ID_NONE;
    SMSType type      = SMSType::UNKNOWN;
    uint32_t numberID = DB_ID_NONE;

    ThreadRecord() = default;
    ThreadRecord(const ThreadsTableRow &rec)

M module-db/Tables/NotesTable.cpp => module-db/Tables/NotesTable.cpp +2 -2
@@ 124,8 124,8 @@ std::pair<std::vector<NotesTableRow>, int> NotesTable::getByText(const std::stri
                                                                 unsigned int limit)
{

    int count          = 0;
    auto queryRet      = db->query("SELECT COUNT(*), INSTR(snippet,'%q') pos FROM notes WHERE pos > 0;", text.c_str());
    int count     = 0;
    auto queryRet = db->query("SELECT COUNT(*), INSTR(snippet,'%q') pos FROM notes WHERE pos > 0;", text.c_str());
    if (queryRet && queryRet->getRowCount() != 0) {
        count = (*queryRet)[0].getUInt32();
    }

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

#pragma once


@@ 12,8 12,8 @@ class Database;

struct NotificationsTableRow : public Record
{
    uint32_t key   = 0;
    uint32_t value = 0;
    uint32_t key       = 0;
    uint32_t value     = 0;
    uint32_t contactID = DB_ID_NONE;
};


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

#pragma once


@@ 10,7 10,8 @@
#include <stdint.h>
#include <vector>

template <typename T, typename F> class Table
template <typename T, typename F>
class Table
{

  protected:

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

#pragma once


@@ 14,7 14,8 @@ namespace db::query
     *
     * @tparam T Type of filter data to carry
     */
    template <typename T> class Filter
    template <typename T>
    class Filter
    {
      protected:
        bool filterPresent = false;

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

#pragma once


@@ 70,7 70,8 @@ namespace db::query
     *
     * @tparam T type of records which were requested.
     */
    template <typename T> class RecordQueryResult : public db::QueryResult
    template <typename T>
    class RecordQueryResult : public db::QueryResult
    {
      private:
        std::vector<T> records;

M module-db/queries/messages/sms/QuerySMSGetForList.hpp => module-db/queries/messages/sms/QuerySMSGetForList.hpp +5 -5
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 13,10 13,10 @@ namespace db::query
    class SMSGetForList : public Query
    {
      public:
        unsigned int threadId  = DB_ID_NONE;
        unsigned int offset    = 0;
        unsigned int limit     = 0;
        unsigned int numberID  = 0;
        unsigned int threadId = DB_ID_NONE;
        unsigned int offset   = 0;
        unsigned int limit    = 0;
        unsigned int numberID = 0;

        SMSGetForList(unsigned int id, unsigned int offset = 0, unsigned int limit = 0, unsigned int numberID = 0);
        [[nodiscard]] auto debugInfo() const -> std::string override;

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

#include "common.hpp"


@@ 74,9 74,9 @@ TEST_CASE("AlarmEventRecord queries tests")
                        uint32_t snoozeDuration,
                        const std::string &rruleText) {
        auto alarmEvent = AlarmEventRecord(0, AlarmTime{hour, minute}, musicTone, enabled, snoozeDuration, rruleText);
        auto query  = std::make_shared<db::query::alarmEvents::Add>(alarmEvent);
        auto ret    = alarmEventRecordInterface.runQuery(query);
        auto result = dynamic_cast<db::query::alarmEvents::AddResult *>(ret.get());
        auto query      = std::make_shared<db::query::alarmEvents::Add>(alarmEvent);
        auto ret        = alarmEventRecordInterface.runQuery(query);
        auto result     = dynamic_cast<db::query::alarmEvents::AddResult *>(ret.get());
        REQUIRE(result != nullptr);
        REQUIRE(result->getResult());
    };

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

#include <catch2/catch.hpp>


@@ 37,7 37,7 @@ TEST_CASE("Notes Table tests")

    SECTION("Get notes by text query")
    {
        constexpr auto testSearch = "TEST";
        constexpr auto testSearch   = "TEST";
        const auto [records, count] = table.getByText(testSearch, 0, 1);
        REQUIRE(records.size() == 1);
        REQUIRE(records[0].snippet == testSnippet);

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

#include "common.hpp"


@@ 23,7 23,7 @@ TEST_CASE("Notifications Table tests")
    NotificationsDB notificationsDb{notificationsPath.c_str()};
    REQUIRE(notificationsDb.isInitialized());

    auto &notificationsTbl = notificationsDb.notifications;
    auto &notificationsTbl        = notificationsDb.notifications;
    const auto notificationsCount = notificationsTbl.count() + 1;
    // clear notifications table
    for (std::size_t id = 1; id <= notificationsCount; id++) {

M module-db/tests/ThreadRecord_tests.cpp => module-db/tests/ThreadRecord_tests.cpp +7 -7
@@ 39,17 39,17 @@ TEST_CASE("Thread Record tests")
    ContactsDB contactsDB(contactsPath.c_str());
    REQUIRE(contactsDB.isInitialized());

    const uint32_t dateTest      = 123456789;
    const char *snippetTest      = "Test snippet";
    const char *snippetTest2     = "Test snippet2";
    const SMSType typeTest       = SMSType::UNKNOWN;
    const uint32_t dateTest  = 123456789;
    const char *snippetTest  = "Test snippet";
    const char *snippetTest2 = "Test snippet2";
    const SMSType typeTest   = SMSType::UNKNOWN;

    ThreadRecordInterface threadRecordInterface1(&smsDB, &contactsDB);

    ThreadRecord recordIN;
    recordIN.date      = dateTest;
    recordIN.snippet   = snippetTest;
    recordIN.type      = typeTest;
    recordIN.date    = dateTest;
    recordIN.snippet = snippetTest;
    recordIN.type    = typeTest;

    const auto threadRecords = threadRecordInterface1.GetCount() + 1;
    // clear all records

M module-gui/gui/Common.hpp => module-gui/gui/Common.hpp +6 -3
@@ 79,15 79,18 @@ namespace gui
        Horizontal
    };

    template <class T> bool operator&(const T &lhs, const T &rhs)
    template <class T>
    bool operator&(const T &lhs, const T &rhs)
    {
        return static_cast<uint32_t>(lhs) & static_cast<uint32_t>(rhs);
    }
    template <class T> T operator|(const T &lhs, const T &rhs)
    template <class T>
    T operator|(const T &lhs, const T &rhs)
    {
        return static_cast<T>(static_cast<uint32_t>(lhs) | static_cast<uint32_t>(rhs));
    }
    template <class T> T operator|=(const T &lhs, const T &rhs)
    template <class T>
    T operator|=(const T &lhs, const T &rhs)
    {
        lhs = lhs | rhs;
        return lhs;

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

#include "BoxLayout.hpp"


@@ 69,7 69,8 @@ namespace gui
        resizeItems();
    }

    template <Axis axis> void BoxLayout::addWidget(Item *item)
    template <Axis axis>
    void BoxLayout::addWidget(Item *item)
    {
        Rect::addWidget(item);
        resizeItems<axis>();


@@ 202,7 203,8 @@ namespace gui
    // space left distposition `first is better` tactics
    // there could be other i.e. socialism: each element take in equal part up to it's max size
    // not needed now == not implemented
    template <Axis axis> void BoxLayout::resizeItems()
    template <Axis axis>
    void BoxLayout::resizeItems()
    {
        Position startingPosition = reverseOrder ? this->area().size(axis) : 0;
        Position leftPosition     = this->getSize(axis);


@@ 242,7 244,8 @@ namespace gui
        Rect::updateDrawArea();
    }

    template <Axis axis> Length BoxLayout::calculateElemResize(Item *el, Length &toSplit)
    template <Axis axis>
    Length BoxLayout::calculateElemResize(Item *el, Length &toSplit)
    {
        auto grantedSize        = sizeStore->get(el);
        Length calculatedResize = 0;


@@ 270,7 273,8 @@ namespace gui
        return calculatedResize;
    }

    template <Axis axis> Length BoxLayout::calculateElemAxisSize(Item *el, Length calculatedResize, Length &toSplit)
    template <Axis axis>
    Length BoxLayout::calculateElemAxisSize(Item *el, Length calculatedResize, Length &toSplit)
    {
        Length axisItemSize = 0;



@@ 285,7 289,8 @@ namespace gui
        return axisItemSize;
    }

    template <Axis axis> Length BoxLayout::calculateElemOrtAxisSize(Item *el)
    template <Axis axis>
    Length BoxLayout::calculateElemOrtAxisSize(Item *el)
    {
        // Get maximum size that element in orthogonal axis can occupy in current layout size.
        Length maxOrthogonalItemInParentSize =


@@ 342,12 347,14 @@ namespace gui
        return axisItemPosition;
    }

    template <Axis axis> Position BoxLayout::calculateElemOrtAxisPosition(Item *el, Length orthogonalItemSize)
    template <Axis axis>
    Position BoxLayout::calculateElemOrtAxisPosition(Item *el, Length orthogonalItemSize)
    {
        return el->getAxisAlignmentValue(orthogonal(axis), orthogonalItemSize);
    }

    template <Axis axis> Position BoxLayout::getAxisAlignmentValue(Position calcPos, Length calcSize, Item *el)
    template <Axis axis>
    Position BoxLayout::getAxisAlignmentValue(Position calcPos, Length calcSize, Item *el)
    {
        auto offset = sizeLeftWithoutElem<axis>(this, el, Area::Normal) <= calcSize
                          ? 0

M module-gui/gui/widgets/BoxLayout.hpp => module-gui/gui/widgets/BoxLayout.hpp +23 -12
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 24,7 24,8 @@ namespace gui
            bool noUpdate;
        };

        template <Axis axis> Length sizeUsed(Item *box, Area area = Area::Min)
        template <Axis axis>
        Length sizeUsed(Item *box, Area area = Area::Min)
        {
            Length sum = 0;



@@ 34,7 35,8 @@ namespace gui
            return sum;
        };

        template <Axis axis> Length sizeUsedWithoutElem(Item *box, Item *elem, Area area = Area::Min)
        template <Axis axis>
        Length sizeUsedWithoutElem(Item *box, Item *elem, Area area = Area::Min)
        {
            Length sum = 0;



@@ 46,21 48,25 @@ namespace gui
            return sum;
        };

        template <Axis axis> Length sizeLeft(Item *box, Area area = Area::Min)
        template <Axis axis>
        Length sizeLeft(Item *box, Area area = Area::Min)
        {
            return (sizeUsed<axis>(box, area) >= box->getSize(axis)) ? 0
                                                                     : box->getSize(axis) - sizeUsed<axis>(box, area);
        };

        template <Axis axis> Length sizeLeftWithoutElem(Item *box, Item *elem, Area area = Area::Min)
        template <Axis axis>
        Length sizeLeftWithoutElem(Item *box, Item *elem, Area area = Area::Min)
        {
            return (sizeUsedWithoutElem<axis>(box, elem, area) >= box->getSize(axis))
                       ? 0
                       : box->getSize(axis) - sizeUsedWithoutElem<axis>(box, elem, area);
        };

        template <Axis axis> void resizeItems();
        template <Axis axis> [[nodiscard]] Position getAxisAlignmentValue(Position calcPos, Length calcSize, Item *el);
        template <Axis axis>
        void resizeItems();
        template <Axis axis>
        [[nodiscard]] Position getAxisAlignmentValue(Position calcPos, Length calcSize, Item *el);

        std::list<Item *> outOfDrawAreaItems;
        void addToOutOfDrawAreaList(Item *item);


@@ 68,16 74,19 @@ namespace gui
        virtual void resizeItems();
        bool reverseOrder = false;

        template <Axis axis> [[nodiscard]] Length calculateElemResize(Item *el, Length &toSplit);
        template <Axis axis>
        [[nodiscard]] Length calculateElemResize(Item *el, Length &toSplit);
        template <Axis axis>
        [[nodiscard]] Length calculateElemAxisSize(Item *el, Length calculatedResize, Length &toSplit);
        template <Axis axis> [[nodiscard]] Length calculateElemOrtAxisSize(Item *el);
        template <Axis axis>
        [[nodiscard]] Length calculateElemOrtAxisSize(Item *el);
        template <Axis axis>
        [[nodiscard]] Position calculateElemAxisPosition(Item *el,
                                                         Length axisItemSize,
                                                         Position &startingPosition,
                                                         Position &leftPosition);
        template <Axis axis> [[nodiscard]] Position calculateElemOrtAxisPosition(Item *el, Length orthogonalItemSize);
        template <Axis axis>
        [[nodiscard]] Position calculateElemOrtAxisPosition(Item *el, Length orthogonalItemSize);

        Item *getLastVisibleElement();



@@ 100,7 109,8 @@ namespace gui
        [[nodiscard]] bool empty() const noexcept;
        /// add item if it will fit in box, return true on success
        /// axis sets direction to define space left in container
        template <Axis axis> void addWidget(Item *item);
        template <Axis axis>
        void addWidget(Item *item);
        /// set navigation from last to fist element in box
        virtual void setNavigation();
        std::list<Item *>::iterator getNavigationFocusedItem();


@@ 119,7 129,8 @@ namespace gui
        /// set focus on specified box element
        bool setFocusOnElement(unsigned int elementNumber);
        void setFocusOnLastElement();
        template <Axis axis> auto handleRequestResize(const Item *, Length request_w, Length request_h) -> Size;
        template <Axis axis>
        auto handleRequestResize(const Item *, Length request_w, Length request_h) -> Size;
        auto onDimensionChanged(const BoundingBox &oldDim, const BoundingBox &newDim) -> bool override;
        void handleContentChanged() override;
        /// Get primary sizes used in axis dominant layouts

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

#pragma once


@@ 11,11 11,11 @@ namespace gui
{
    class CheckBox : public HBox
    {
        bool checkState                                              = false;
        Image *image                                                 = nullptr;
        std::function<void(const UTF8 &text)> navBarTemporaryMode    = nullptr;
        std::function<void()> navBarRestoreFromTemporaryMode         = nullptr;
        nav_bar::Side navBarSide                                     = nav_bar::Side::Left;
        bool checkState                                           = false;
        Image *image                                              = nullptr;
        std::function<void(const UTF8 &text)> navBarTemporaryMode = nullptr;
        std::function<void()> navBarRestoreFromTemporaryMode      = nullptr;
        nav_bar::Side navBarSide                                  = nav_bar::Side::Left;

        void applyCallbacks();


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

#pragma once


@@ 11,10 11,10 @@ namespace gui
{
    namespace imageBoxWithText
    {
        inline constexpr auto wh          = 100;
        inline constexpr auto wh                 = 100;
        inline constexpr auto text_margin_top    = 11;
        inline constexpr auto text_margin_bottom = 5;
        inline constexpr auto font        = style::window::font::verysmall;
        inline constexpr auto font               = style::window::font::verysmall;
        inline constexpr auto fontBold           = style::window::font::verysmallbold;
    } // namespace imageBoxWithText


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

#pragma once


@@ 18,7 18,8 @@ namespace gui
        ListItem();
    };

    template <class T> class ListItemWithCallbacks : public ListItem
    template <class T>
    class ListItemWithCallbacks : public ListItem
    {
      public:
        std::function<bool()> onEmptyCallback                           = nullptr;

M module-gui/gui/widgets/SideListView.hpp => module-gui/gui/widgets/SideListView.hpp +2 -2
@@ 19,8 19,8 @@ namespace gui
    class SideListView : public Rect, public ListViewEngine
    {
      protected:
        HBarGraph *pageBar  = nullptr;
        VBox *bodyOverlay   = nullptr;
        HBarGraph *pageBar = nullptr;
        VBox *bodyOverlay  = nullptr;

        auto createPageBar() -> void;
        auto setFocus() -> void override;

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

#pragma once


@@ 7,7 7,8 @@

namespace gui
{
    template <class Parent, class First, class Center, class Last> class ThreeBox : public Parent
    template <class Parent, class First, class Center, class Last>
    class ThreeBox : public Parent
    {
      public:
        explicit ThreeBox(Item *parent, Position x = 0, Position y = 0, Length w = 0, Length = 0);


@@ 18,13 19,15 @@ namespace gui
        Last *lastBox     = nullptr;
    };

    template <class First, class Center, class Last> class HThreeBox : public ThreeBox<HBox, First, Center, Last>
    template <class First, class Center, class Last>
    class HThreeBox : public ThreeBox<HBox, First, Center, Last>
    {
      public:
        explicit HThreeBox(Item *parent, Position x = 0, Position y = 0, Length w = 0, Length h = 0);
    };

    template <class First, class Center, class Last> class VThreeBox : public ThreeBox<VBox, First, Center, Last>
    template <class First, class Center, class Last>
    class VThreeBox : public ThreeBox<VBox, First, Center, Last>
    {
      public:
        explicit VThreeBox(Item *parent, Position x = 0, Position y = 0, Length w = 0, Length = 0);

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

#pragma once


@@ 19,7 19,7 @@ namespace gui::header
    class Header : public HThreeBox<HBox, HBox, HBox>
    {
      private:
        Label *title    = nullptr;
        Label *title = nullptr;

        Item *createTitle(const UTF8 &text);


M module-gui/gui/widgets/status-bar/StatusBarWidgetBase.hpp => module-gui/gui/widgets/status-bar/StatusBarWidgetBase.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 30,7 30,8 @@ class StatusBarVisitor
    virtual ~StatusBarVisitor() = default;
};

template <typename ItemPolicy> class StatusBarWidgetBase : public ItemPolicy
template <typename ItemPolicy>
class StatusBarWidgetBase : public ItemPolicy
{
  public:
    using ItemPolicy::ItemPolicy;

M module-gui/gui/widgets/text/core/lines/Lines.cpp => module-gui/gui/widgets/text/core/lines/Lines.cpp +1 -1
@@ 112,7 112,7 @@ namespace gui
                              unsigned int linesCount) -> void
    {
        const Position initialTopPadding = lineYPosition;
        Length initHeight          = text->getTextFormat().getFont()->info.line_height;
        Length initHeight                = text->getTextFormat().getFont()->info.line_height;

        while (true) {
            auto textLine = gui::MultiTextLine(drawCursor, w, initHeight, underLineProperties);

M module-gui/gui/widgets/text/parsers/RichTextParser.cpp => module-gui/gui/widgets/text/parsers/RichTextParser.cpp +1 -1
@@ 382,7 382,7 @@ struct walker : pugi::xml_tree_walker
    auto push_short_text_node(pugi::xml_node &node)
    {
        log_parser("shortened text node name: %s", node.name());
        auto &decor      = text::NodeDecor::get();
        auto &decor    = text::NodeDecor::get();
        auto attrName  = text::ShortTextNodes::get(node.name(), text::ShortTextNodes::AttributeContent::Name);
        auto attrValue = text::ShortTextNodes::get(node.name(), text::ShortTextNodes::AttributeContent::Value);
        if (attrName.has_value() && attrValue.has_value()) {

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

#pragma once


@@ 11,7 11,7 @@ namespace gui
    class ItemTree
    {
      public:
        [[nodiscard]] virtual auto hasNext() const noexcept -> bool    = 0;
        [[nodiscard]] virtual auto hasNext() const noexcept -> bool = 0;
        /// Provides wrapper for next `gui::Item` object in traverse order. On call concrete implementations might
        /// change state of the tree by removing node being returned. Must be used in pair with `hasNode()`
        [[nodiscard]] virtual auto getNext() noexcept -> gui::ItemNode = 0;

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

#include <catch2/catch.hpp>


@@ 17,7 17,7 @@ TEST_CASE("Testo Font")
        auto f        = Font(27);
        auto raw_font = fm.getFont(style::window::font::medium);
        REQUIRE(fm.getFontByName("gt_pressura_regular_27") == raw_font); /// check that style is ok
        REQUIRE(f.raw() == raw_font);                              /// check that Font() works ok
        REQUIRE(f.raw() == raw_font);                                    /// check that Font() works ok
        f.setWeight(Font::Weight::Bold);
        REQUIRE(f.raw() == fm.getFont(style::window::font::mediumbold)); // check for changed weight
        f.setSize(30); // we are bold, now set size 30 which is bigbold

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

#include <catch2/catch.hpp>


@@ 91,8 91,8 @@ TEST_CASE("Getting charKey after clicking button twice")
    gui::KeyInputMappedTranslation translator;
    RawKey key;

    key.keyCode                    = bsp::KeyCodes::NumericKey2;
    key.state                      = RawKey::State::Released;
    key.keyCode = bsp::KeyCodes::NumericKey2;
    key.state   = RawKey::State::Released;
    translator.handle(key, "English_lower");
    REQUIRE(translator.handle(key, "English_lower") == 98);
}

M module-services/service-antenna/ServiceAntenna.cpp => module-services/service-antenna/ServiceAntenna.cpp +31 -31
@@ 95,40 95,40 @@ sys::MessagePointer ServiceAntenna::DataReceivedHandler(sys::DataMessage *msgl, 
{
    bool handled = false;

        switch (msgl->messageType) {
        case MessageType::StateChange:
            HandleStateChange(state->get());
            break;
        case MessageType::AntennaChanged: {
            bsp::cellular::antenna antenna;
            if (CellularServiceAPI::GetAntenna(this, antenna)) {
                currentAntenna = antenna;
                if (state->get() == antenna::State::switchAntenna) {
                    LOG_INFO("Antena switched.");

                    state->enableStateTimeout(cpp_freertos::Ticks::GetTicks(),
                                              pdMS_TO_TICKS(antenna::connectionStatusTimeout),
                                              antenna::State::switchAntenna);
                    state->set(antenna::State::connectionStatus);
                }
    switch (msgl->messageType) {
    case MessageType::StateChange:
        HandleStateChange(state->get());
        break;
    case MessageType::AntennaChanged: {
        bsp::cellular::antenna antenna;
        if (CellularServiceAPI::GetAntenna(this, antenna)) {
            currentAntenna = antenna;
            if (state->get() == antenna::State::switchAntenna) {
                LOG_INFO("Antena switched.");

                state->enableStateTimeout(cpp_freertos::Ticks::GetTicks(),
                                          pdMS_TO_TICKS(antenna::connectionStatusTimeout),
                                          antenna::State::switchAntenna);
                state->set(antenna::State::connectionStatus);
            }
            handled = true;
            break;
        }
        case MessageType::AntennaLockService: {
            auto msg = dynamic_cast<AntennaLockRequestMessage *>(msgl);
            if (msg != nullptr) {
                handleLockRequest(msg->request);
                handled = true;
            }
        } break;
        case MessageType::AntennaGetLockState: {
            auto responseMessage = std::make_shared<AntennaLockRequestResponse>(true, serviceLocked);
            return responseMessage;
        } break;
        default:
            break;
        handled = true;
        break;
    }
    case MessageType::AntennaLockService: {
        auto msg = dynamic_cast<AntennaLockRequestMessage *>(msgl);
        if (msg != nullptr) {
            handleLockRequest(msg->request);
            handled = true;
        }
    } break;
    case MessageType::AntennaGetLockState: {
        auto responseMessage = std::make_shared<AntennaLockRequestResponse>(true, serviceLocked);
        return responseMessage;
    } break;
    default:
        break;
    }

    if (handled)
        return std::make_shared<sys::ResponseMessage>();

M module-services/service-antenna/include/service-antenna/ServiceAntenna.hpp => module-services/service-antenna/include/service-antenna/ServiceAntenna.hpp +2 -1
@@ 94,7 94,8 @@ class ServiceAntenna : public sys::Service

namespace sys
{
    template <> struct ManifestTraits<ServiceAntenna>
    template <>
    struct ManifestTraits<ServiceAntenna>
    {
        static auto GetManifest() -> ServiceManifest
        {

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

#pragma once


@@ 8,7 8,8 @@

namespace state
{
    template <typename T> class State
    template <typename T>
    class State
    {

      private:

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

#include "MmiActionsParams.hpp"


@@ 77,7 77,6 @@ MMIResultParams::MMIResultParams(MMIResult result, std::shared_ptr<MMICustomResu
    : result(result), customResult(std::move(customResult))
{}


MMIResultParams::MMIResult MMIResultParams::getData() const noexcept
{
    return result;

M module-services/service-audio/ServiceAudio.cpp => module-services/service-audio/ServiceAudio.cpp +1 -1
@@ 846,7 846,7 @@ auto ServiceAudio::handleA2DPVolumeChangedOnBluetoothDevice(sys::Message *msgl) 
    assert(a2dpMsg != nullptr);

    const auto context = getCurrentContext();
    const auto volume = volume::scaler::a2dp::toSystemVolume(a2dpMsg->getVolume());
    const auto volume  = volume::scaler::a2dp::toSystemVolume(a2dpMsg->getVolume());
    bus.sendMulticast(std::make_shared<VolumeChanged>(volume, context, VolumeChangeRequestSource::A2DP),
                      sys::BusChannel::ServiceAudioNotifications);


M module-services/service-audio/include/service-audio/ServiceAudio.hpp => module-services/service-audio/include/service-audio/ServiceAudio.hpp +2 -1
@@ 133,7 133,8 @@ class ServiceAudio : public sys::Service

namespace sys
{
    template <> struct ManifestTraits<ServiceAudio>
    template <>
    struct ManifestTraits<ServiceAudio>
    {
        static auto GetManifest() -> ServiceManifest
        {

M module-services/service-bluetooth/service-bluetooth/BluetoothDevicesModel.cpp => module-services/service-bluetooth/service-bluetooth/BluetoothDevicesModel.cpp +1 -1
@@ 83,7 83,7 @@ void BluetoothDevicesModel::syncDevicesWithApp()

void BluetoothDevicesModel::setInternalDeviceState(const Devicei &device, const DeviceState &state)
{
    auto dev                      = getDeviceByAddress(device.address);
    auto dev = getDeviceByAddress(device.address);
    if (not dev) {
        LOG_ERROR("no such device - ignored");
        return;

M module-services/service-bluetooth/service-bluetooth/ServiceBluetooth.hpp => module-services/service-bluetooth/service-bluetooth/ServiceBluetooth.hpp +5 -3
@@ 76,7 76,7 @@ namespace cellular
    class CurrentOperatorNameNotification;
    class NetworkStatusUpdateNotification;
    class CallActiveNotification;
}
} // namespace cellular

class ServiceBluetooth : public sys::Service
{


@@ 109,7 109,8 @@ class ServiceBluetooth : public sys::Service
    void startTimeoutTimer();
    void stopTimeoutTimer();

    template <typename T> auto connectHandler() -> bool
    template <typename T>
    auto connectHandler() -> bool
    {
        return connect(typeid(T), [&](sys::Message *msg) { return handle(static_cast<T *>(msg)); });
    }


@@ 153,7 154,8 @@ class ServiceBluetooth : public sys::Service

namespace sys
{
    template <> struct ManifestTraits<ServiceBluetooth>
    template <>
    struct ManifestTraits<ServiceBluetooth>
    {
        static auto GetManifest() -> ServiceManifest
        {

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-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "SettingsHolder.hpp"


@@ 60,4 60,4 @@ namespace bluetooth
    {
        settingsProvider->deinit();
    }
} // namespace Bluetooth
} // namespace bluetooth

M module-services/service-cellular/CellularServiceAPI.cpp => module-services/service-cellular/CellularServiceAPI.cpp +1 -1
@@ 59,7 59,7 @@ std::string CellularServiceAPI::GetIMSI(sys::Service *serv, bool getFullIMSINumb

    auto msg = std::make_shared<cellular::GetIMSIMessage>();

    auto ret                          = serv->bus.sendUnicastSync(msg, ServiceCellular::serviceName, 5000);
    auto ret                            = serv->bus.sendUnicastSync(msg, ServiceCellular::serviceName, 5000);
    cellular::ResponseMessage *response = dynamic_cast<cellular::ResponseMessage *>(ret.second.get());

    if (response == nullptr) {

M module-services/service-cellular/CellularUrcHandler.cpp => module-services/service-cellular/CellularUrcHandler.cpp +0 -1
@@ 10,7 10,6 @@

using namespace at::urc;


void CellularUrcHandler::Handle(Clip &urc)
{
    LOG_TRACE("incoming call...");

M module-services/service-cellular/Pdu.cpp => module-services/service-cellular/Pdu.cpp +12 -6
@@ 466,7 466,8 @@ namespace pdu
        const char *idCStr;
    };

    template <typename NameOrValue> inline bool isKnown(NameOrValue const &nameOrValue, KnownHeader const &knownHeader)
    template <typename NameOrValue>
    inline bool isKnown(NameOrValue const &nameOrValue, KnownHeader const &knownHeader)
    {
        return std::visit(
            [&](auto const &val) {


@@ 608,7 609,8 @@ namespace pdu
                return true;
            }

            template <typename Value> static bool text(Octets &octets, std::uint8_t charOctet, Value &value)
            template <typename Value>
            static bool text(Octets &octets, std::uint8_t charOctet, Value &value)
            {
                // Do not ignore the first character, it's part of the text
                Text text(octets.begin(), octets.begin());


@@ 668,7 670,8 @@ namespace pdu
        // p81
        struct IgnoreHeaderValuePolicy
        {
            template <typename Value> static bool data(Octets &octets, std::uint8_t lengthOctet, Value &value)
            template <typename Value>
            static bool data(Octets &octets, std::uint8_t lengthOctet, Value &value)
            {
                octets.ignore();
                std::uint32_t length = lengthOctet;


@@ 684,7 687,8 @@ namespace pdu
                return true;
            }

            template <typename Value> static bool text(Octets &octets, std::uint8_t charOctet, Value &value)
            template <typename Value>
            static bool text(Octets &octets, std::uint8_t charOctet, Value &value)
            {
                octets.ignore();
                while (charOctet != EndOfString) {


@@ 695,7 699,8 @@ namespace pdu
                return true;
            }

            template <typename Value> static bool shortInteger(Octets &octets, std::uint8_t uintOctet, Value &value)
            template <typename Value>
            static bool shortInteger(Octets &octets, std::uint8_t uintOctet, Value &value)
            {
                octets.ignore();
                return true;


@@ 704,7 709,8 @@ namespace pdu

        // http://www.openmobilealliance.org/release/Browser_Protocol_Stack/V2_1-20110315-A/OMA-WAP-TS-WSP-V1_0-20110315-A.pdf,
        // p79
        template <typename Policy, typename Value> static bool parseGeneric(Octets &octets, Value &value)
        template <typename Policy, typename Value>
        static bool parseGeneric(Octets &octets, Value &value)
        {
            std::uint8_t octet = 0x00;
            if (!octets.peek(octet)) {

M module-services/service-cellular/ServiceCellular.cpp => module-services/service-cellular/ServiceCellular.cpp +2 -3
@@ 1487,8 1487,8 @@ bool ServiceCellular::transmitDtmfTone(DTMFCode code)
    auto channel = cmux->get(CellularMux::Channel::Commands);
    at::Result resp;
    if (channel) {
        auto command           = at::factory(at::AT::QLDTMF);
        resp                   = channel->cmd(command.getCmd() + std::string(code));
        auto command = at::factory(at::AT::QLDTMF);
        resp         = channel->cmd(command.getCmd() + std::string(code));
        if (resp) {
            command = at::factory(at::AT::VTS);
            resp    = channel->cmd(command.getCmd() + std::string(code));


@@ 2271,7 2271,6 @@ auto ServiceCellular::tetheringTurnOnURC() -> bool
            LOG_ERROR("Failed to stop SMS URC");
            return false;
        }

    }
    return true;
}

M module-services/service-cellular/call/CallMachine.hpp => module-services/service-cellular/call/CallMachine.hpp +2 -2
@@ 54,8 54,8 @@ namespace call
    {
        void operator()(Dependencies &di, CallData &call)
        {
            call      = CallData{};
            call.mode = di.modem->getMode();
            call           = CallData{};
            call.mode      = di.modem->getMode();
            call.tethering = di.modem->getTethering();
            di.sentinel->ReleaseMinimumFrequency();
            di.timer->stop();

M module-services/service-cellular/call/CellularCall.cpp => module-services/service-cellular/call/CellularCall.cpp +1 -1
@@ 140,4 140,4 @@ namespace call
        return machine->active();
    }

} // namespace CellularCall
} // namespace call

M module-services/service-cellular/call/api/CallGUI.cpp => module-services/service-cellular/call/api/CallGUI.cpp +0 -3
@@ 20,6 20,3 @@ void CallGUI::notifyCLIP(const utils::PhoneNumber::View &number)
    app::manager::Controller::sendAction(
        owner, app::manager::actions::HandleCallerId, std::make_unique<app::manager::actions::CallParams>(number));
}




M module-services/service-cellular/call/api/CallGUI.hpp => module-services/service-cellular/call/api/CallGUI.hpp +3 -3
@@ 15,9 15,9 @@ namespace call::api
    class GUI
    {
      public:
        virtual void notifyRING()                                                              = 0;
        virtual void notifyCLIP(const utils::PhoneNumber::View &number)                        = 0;
        virtual ~GUI()                                                                         = default;
        virtual void notifyRING()                                       = 0;
        virtual void notifyCLIP(const utils::PhoneNumber::View &number) = 0;
        virtual ~GUI()                                                  = default;
    };
}; // namespace call::api


M module-services/service-cellular/call/api/CallMulticast.hpp => module-services/service-cellular/call/api/CallMulticast.hpp +4 -4
@@ 17,15 17,15 @@ namespace call::api
    {
      public:
        virtual void notifyIncomingCall()                                                      = 0;
        virtual void notifyIdentifiedCall(const utils::PhoneNumber::View &number) = 0;
        virtual void notifyCallActive()                                           = 0;
        virtual void notifyCallAborted()                                          = 0;
        virtual void notifyIdentifiedCall(const utils::PhoneNumber::View &number)              = 0;
        virtual void notifyCallActive()                                                        = 0;
        virtual void notifyCallAborted()                                                       = 0;
        virtual void notifyOutgoingCallAnswered()                                              = 0;
        virtual void notifyCallStarted(const utils::PhoneNumber &number, const CallType &type) = 0;
        virtual void notifyCallEnded()                                                         = 0;
        virtual void notifyCallDurationUpdate(const time_t &duration)                          = 0;

        virtual ~Multicast()                                                      = default;
        virtual ~Multicast() = default;
    };
} // namespace call::api


M module-services/service-cellular/call/api/ModemCallApi.hpp => module-services/service-cellular/call/api/ModemCallApi.hpp +5 -5
@@ 15,12 15,12 @@ namespace call::api
    {
      public:
        virtual bool answerIncomingCall()                  = 0;
        virtual bool hangupCall()                     = 0;
        virtual bool rejectCall()                     = 0;
        virtual bool areCallsFromFavouritesEnabled()  = 0;
        virtual sys::phone_modes::PhoneMode getMode() = 0;
        virtual bool hangupCall()                          = 0;
        virtual bool rejectCall()                          = 0;
        virtual bool areCallsFromFavouritesEnabled()       = 0;
        virtual sys::phone_modes::PhoneMode getMode()      = 0;
        virtual sys::phone_modes::Tethering getTethering() = 0;
        virtual ~Api()                                = default;
        virtual ~Api()                                     = default;
    };
} // namespace call::api


M module-services/service-cellular/call/include/call/CellularCall.hpp => module-services/service-cellular/call/include/call/CellularCall.hpp +2 -2
@@ 34,7 34,7 @@ namespace call

    struct CallData
    {
        CalllogRecord record             = {};
        CalllogRecord record                  = {};
        sys::phone_modes::PhoneMode mode      = sys::phone_modes::PhoneMode::Uninitialized;
        sys::phone_modes::Tethering tethering = sys::phone_modes::Tethering::Off;
    };


@@ 82,4 82,4 @@ namespace call
        /// if so - we have ongoing call in handling
        bool active() const;
    };
} // namespace CellularCall
} // namespace call

M module-services/service-cellular/call/tests/test-CallMachine.cpp => module-services/service-cellular/call/tests/test-CallMachine.cpp +8 -7
@@ 94,7 94,8 @@ namespace mocks
        return api;
    }

    template <typename T> auto mock_to_shared(T *val)
    template <typename T>
    auto mock_to_shared(T *val)
    {
        auto t = std::shared_ptr<T>(val, [](...) {});
        return t;


@@ 114,13 115,13 @@ namespace mocks

        DIWrapper(bool dnd = false, bool tethering = false) : api(mocks::api(dnd, tethering))
        {
            auto audio_p     = mock_to_shared<call::api::Audio>(&audio.get());
            auto multicast_p = mock_to_shared<call::api::Multicast>(&multicast.get());
            auto gui_p       = mock_to_shared<call::api::GUI>(&gui.get());
            auto db_p        = mock_to_shared<call::api::DB>(&db.get());
            auto timer_p     = mock_to_shared<call::api::Timer>(&timer.get());
            auto audio_p      = mock_to_shared<call::api::Audio>(&audio.get());
            auto multicast_p  = mock_to_shared<call::api::Multicast>(&multicast.get());
            auto gui_p        = mock_to_shared<call::api::GUI>(&gui.get());
            auto db_p         = mock_to_shared<call::api::DB>(&db.get());
            auto timer_p      = mock_to_shared<call::api::Timer>(&timer.get());
            auto timer_ring_p = mock_to_shared<call::api::TimerRing>(&timerRing.get());
            auto api_p       = mock_to_shared<call::api::Api>(&api.get());
            auto api_p        = mock_to_shared<call::api::Api>(&api.get());
            di                = call::Dependencies{std::move(audio_p),
                                    std::move(multicast_p),
                                    std::move(gui_p),

M module-services/service-cellular/connection-manager/ConnectionManager.cpp => module-services/service-cellular/connection-manager/ConnectionManager.cpp +4 -4
@@ 24,7 24,7 @@ void ConnectionManager::onTimerTick()
    minutesOfflineElapsed++;
    if (minutesOfflineElapsed.count() >= connectionInterval.count()) {
        minutesOfflineElapsed = static_cast<std::chrono::minutes>(0);
        onlinePeriod = true;
        onlinePeriod          = true;
        cellular->holdMinimumCpuFrequency();
        cellular->connectToNetwork();
        return;


@@ 42,8 42,8 @@ void ConnectionManager::onTimerTick()

void ConnectionManager::setInterval(const std::chrono::minutes interval)
{
    connectionInterval   = interval;
    minutesOnlineElapsed = static_cast<std::chrono::minutes>(0);
    connectionInterval    = interval;
    minutesOnlineElapsed  = static_cast<std::chrono::minutes>(0);
    minutesOfflineElapsed = static_cast<std::chrono::minutes>(0);
}



@@ 77,7 77,7 @@ auto ConnectionManager::handleModeChangeToCommonOffline() -> bool

    failRetries           = 0;
    minutesOfflineElapsed = static_cast<std::chrono::minutes>(0);
    minutesOnlineElapsed = static_cast<std::chrono::minutes>(0);
    minutesOnlineElapsed  = static_cast<std::chrono::minutes>(0);

    if (isMessagesOnlyMode()) {
        handleModeChangeToMessageOnlyMode();

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

#pragma once


@@ 211,8 211,8 @@ namespace packet_data

    } // namespace APN
    constexpr unsigned char EmptyContextId = 0;
    constexpr unsigned char MINContextId = 1;
    constexpr unsigned char MAXContextId = 16;
    constexpr unsigned char MINContextId   = 1;
    constexpr unsigned char MAXContextId   = 16;

    /** Comment from quectel (2020.12):
     * As I know, only VZW MBN would use IMS on CID 1 to register IMS service directly.


@@ 222,8 222,8 @@ namespace packet_data
     * configure their own APN on CID1.  With this rule, it’s easy for customer
     * to configure their APN no matter which MBN file is activated
     */
    constexpr auto internalAPNMaxId      = 4;
    using ContextMap                     = std::unordered_map<unsigned char, std::shared_ptr<APN::Config>>;
    using ContextPair                    = std::pair<unsigned char, std::shared_ptr<APN::Config>>;
    constexpr auto internalAPNMaxId = 4;
    using ContextMap                = std::unordered_map<unsigned char, std::shared_ptr<APN::Config>>;
    using ContextPair               = std::pair<unsigned char, std::shared_ptr<APN::Config>>;

} // namespace packet_data

M module-services/service-cellular/service-cellular/ServiceCellular.hpp => module-services/service-cellular/service-cellular/ServiceCellular.hpp +2 -1
@@ 320,7 320,8 @@ class ServiceCellular : public sys::Service

namespace sys
{
    template <> struct ManifestTraits<ServiceCellular>
    template <>
    struct ManifestTraits<ServiceCellular>
    {
        static auto GetManifest() -> ServiceManifest
        {

M module-services/service-cellular/src/ServiceCellularPriv.cpp => module-services/service-cellular/src/ServiceCellularPriv.cpp +1 -1
@@ 77,7 77,7 @@ namespace cellular::internal
         * Request message handlers
         */
        owner->connect(typeid(request::sim::SetActiveSim), [&](sys::Message *request) -> sys::MessagePointer {
            auto msg = static_cast<request::sim::SetActiveSim *>(request);
            auto msg    = static_cast<request::sim::SetActiveSim *>(request);
            auto result = simCard->handleSetActiveSim(msg->sim);
            owner->simTimer.start();
            simCard->handleSimCardSelected();

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

#pragma once


@@ 251,8 251,8 @@ namespace cellular::service
         */
        std::optional<at::SimInsertedStatus> readSimCardInsertStatus();

        at::BaseChannel *channel        = nullptr;
        std::optional<api::SimSlot> sim = std::nullopt;
        at::BaseChannel *channel                         = nullptr;
        std::optional<api::SimSlot> sim                  = std::nullopt;
        std::optional<at::SimInsertedStatus> simInserted = std::nullopt;
        bool simSelectInProgress                         = false;
        bool isSimSelected                               = false;

M module-services/service-cellular/tests/unittest_smssendhandler.cpp => module-services/service-cellular/tests/unittest_smssendhandler.cpp +5 -5
@@ 34,7 34,7 @@ TEST_CASE("SMSSendHandler functionality")

    SECTION("Schedule standard send SMS procedure")
    {
        auto record = buildValidSMSRecord();
        auto record                = buildValidSMSRecord();
        constexpr auto sendOnDelay = false;

        outSMS.handleDBNotification();


@@ 47,7 47,7 @@ TEST_CASE("SMSSendHandler functionality")

    SECTION("Schedule non-standard send SMS procedure")
    {
        auto record = buildValidSMSRecord();
        auto record                = buildValidSMSRecord();
        constexpr auto sendOnDelay = false;

        outSMS.handleDBNotification();


@@ 61,7 61,7 @@ TEST_CASE("SMSSendHandler functionality")
    }
    SECTION("Schedule queued send SMS procedure")
    {
        auto record = buildValidSMSRecord();
        auto record                = buildValidSMSRecord();
        constexpr auto sendOnDelay = false;

        outSMS.handleDBNotification();


@@ 79,8 79,8 @@ TEST_CASE("SMSSendHandler functionality")

    SECTION("Check offline mode")
    {
        outSMS.onGetOfflineMode = []() -> bool { return true; };
        auto record             = buildValidSMSRecord();
        outSMS.onGetOfflineMode    = []() -> bool { return true; };
        auto record                = buildValidSMSRecord();
        constexpr auto sendOnDelay = false;

        outSMS.handleDBNotification();

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

#include "service-db/DBServiceAPI.hpp"


@@ 22,7 22,7 @@ std::pair<bool, std::uint64_t> DBServiceAPI::GetQuery(sys::Service *serv,
                                                      db::Interface::Name database,
                                                      std::unique_ptr<db::Query> query)
{
    auto msg = std::make_shared<db::QueryMessage>(database, std::move(query));
    auto msg             = std::make_shared<db::QueryMessage>(database, std::move(query));
    const auto isSuccess = serv->bus.sendUnicast(msg, service::name::db);
    return std::make_pair(isSuccess, msg->uniID);
}

M module-services/service-db/agents/quotes/QuotesAgent.cpp => module-services/service-db/agents/quotes/QuotesAgent.cpp +6 -6
@@ 64,9 64,9 @@ namespace Quotes

    auto QuotesAgent::handleEnableCategoryById(std::shared_ptr<db::Query> query) -> std::unique_ptr<db::QueryResult>
    {
        auto req         = std::dynamic_pointer_cast<Messages::EnableCategoryByIdRequest>(query);
        auto req              = std::dynamic_pointer_cast<Messages::EnableCategoryByIdRequest>(query);
        auto queryResult      = predefinedDB->execute(Queries::enableCategory, req->enable, req->categoryId);
        auto response    = std::make_unique<Messages::EnableCategoryByIdResponse>(std::move(queryResult));
        auto response         = std::make_unique<Messages::EnableCategoryByIdResponse>(std::move(queryResult));
        constexpr auto forced = true;
        randomizedQuoteModel.updateList(forced);
        response->setRequestQuery(query);


@@ 86,9 86,9 @@ namespace Quotes

    auto QuotesAgent::handleEnableQuoteById(std::shared_ptr<db::Query> query) -> std::unique_ptr<db::QueryResult>
    {
        auto req         = std::dynamic_pointer_cast<Messages::EnableQuoteByIdRequest>(query);
        auto req              = std::dynamic_pointer_cast<Messages::EnableQuoteByIdRequest>(query);
        auto queryResult      = customDB->execute(Queries::enableQuote, req->enable, req->quoteId);
        auto response    = std::make_unique<Messages::EnableQuoteByIdResponse>(queryResult);
        auto response         = std::make_unique<Messages::EnableQuoteByIdResponse>(queryResult);
        constexpr auto forced = true;
        randomizedQuoteModel.updateList(forced);
        response->setRequestQuery(query);


@@ 145,7 145,7 @@ namespace Quotes

    auto QuotesAgent::handleWriteQuote(std::shared_ptr<db::Query> query) -> std::unique_ptr<db::QueryResult>
    {
        auto req         = std::dynamic_pointer_cast<Messages::WriteQuoteRequest>(query);
        auto req = std::dynamic_pointer_cast<Messages::WriteQuoteRequest>(query);
        auto queryResult =
            customDB->execute(Queries::writeQuote, req->quote.c_str(), req->author.c_str(), req->enabled, req->quoteId);
        constexpr auto forced = true;


@@ 157,7 157,7 @@ namespace Quotes

    auto QuotesAgent::handleDeleteQuote(std::shared_ptr<db::Query> query) -> std::unique_ptr<db::QueryResult>
    {
        auto req = std::dynamic_pointer_cast<Messages::DeleteQuoteRequest>(query);
        auto req              = std::dynamic_pointer_cast<Messages::DeleteQuoteRequest>(query);
        auto queryResult      = customDB->execute(Queries::deleteQuote, req->quoteId);
        constexpr auto forced = true;
        randomizedQuoteModel.updateList(forced);

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

#include <service-db/EntryPath.hpp>


@@ 58,7 58,8 @@ namespace settings
        }
    }

    template <typename T, typename... Args> auto message(sys::BusProxy &bus, Args... args)
    template <typename T, typename... Args>
    auto message(sys::BusProxy &bus, Args... args)
    {
        bus.sendUnicast(std::make_shared<T>(args...), service::name::db);
    }

M module-services/service-db/agents/settings/SystemSettings.hpp => module-services/service-db/agents/settings/SystemSettings.hpp +2 -2
@@ 81,7 81,7 @@ namespace settings

    namespace Display
    {
        constexpr inline auto invertedMode = "display_inverted_mode";
        constexpr inline auto invertedMode              = "display_inverted_mode";
        constexpr inline auto lockScreenDeepRefreshRate = "display_lock_screen_deep_refresh_rate";
    } // namespace Display
}; // namespace settings
};    // namespace settings

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

#pragma once


@@ 6,7 6,8 @@
#include <service-db/DatabaseAgent.hpp>
#include <vector>

template <typename RecordType> struct PagedData
template <typename RecordType>
struct PagedData
{
    std::vector<RecordType> data;
    unsigned int count;

M module-services/service-db/test/test-service-db-quotes.cpp => module-services/service-db/test/test-service-db-quotes.cpp +9 -9
@@ 11,8 11,8 @@

using namespace Quotes;

constexpr auto totalNumOfCategories          = 3;
constexpr auto totalNumOfQuotes              = 5;
constexpr auto totalNumOfCategories = 3;
constexpr auto totalNumOfQuotes     = 5;

TEST_CASE("Quotes")
{


@@ 66,8 66,8 @@ TEST_CASE("Quotes")
        REQUIRE(oldRandomizedSequence != quotesString);

        oldRandomizedSequence = quotesString;
        enable = true;
        success = tester->enableCategory(categoryId, enable);
        enable                = true;
        success               = tester->enableCategory(categoryId, enable);
        REQUIRE(success);
        categories = tester->getCategoriesList();
        for (const auto &category : categories) {


@@ 99,8 99,8 @@ TEST_CASE("Quotes")
        REQUIRE(oldRandomizedSequence != quotesString);

        oldRandomizedSequence = quotesString;
        enable = true;
        success = tester->enableQuote(quoteId, enable);
        enable                = true;
        success               = tester->enableQuote(quoteId, enable);
        REQUIRE(success);

        customQuotes = tester->getQuotesFromCustomCategory();


@@ 114,9 114,9 @@ TEST_CASE("Quotes")

    SECTION("Add/Read/Write/Delete quote")
    {
        std::string quote   = "TEST QUOTE";
        std::string author  = "TEST AUTHOR";
        bool enabled        = true;
        std::string quote  = "TEST QUOTE";
        std::string author = "TEST AUTHOR";
        bool enabled       = true;

        // Initial conditions
        auto customQuotes                  = tester->getQuotesFromCustomCategory();

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

#include "service-desktop/USBSecurityModel.hpp"


@@ 14,7 14,7 @@ namespace sdesktop
{
    USBSecurityModel::USBSecurityModel(sys::Service *ownerSrv, settings::Settings *srvSettings)
    {
        settings = srvSettings;
        settings    = srvSettings;
        phoneLocked = PhoneLockState::Locked;
    }


M module-services/service-desktop/WorkerDesktop.cpp => module-services/service-desktop/WorkerDesktop.cpp +1 -1
@@ 101,7 101,7 @@ bool WorkerDesktop::reinit(const std::filesystem::path &path)
void WorkerDesktop::reset()
{
    initialized = false;
    usbStatus = bsp::USBDeviceStatus::Disconnected;
    usbStatus   = bsp::USBDeviceStatus::Disconnected;
    bsp::usbDeinit();

    bsp::usbInitParams initParams = {receiveQueue, irqQueue, serialNumber.c_str()};

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

#include <endpoints/filesystem/FileContext.hpp>


@@ 6,10 6,7 @@
#include <utility>
#include <fstream>

FileContext::FileContext(const std::filesystem::path &path,
                         std::size_t size,
                         std::size_t chunkSize,
                         std::size_t offset)
FileContext::FileContext(const std::filesystem::path &path, std::size_t size, std::size_t chunkSize, std::size_t offset)
    : path(path), size(size), offset(offset), chunkSize(chunkSize)
{
    if (!size || !chunkSize) {


@@ 20,8 17,7 @@ FileContext::FileContext(const std::filesystem::path &path,
}

FileContext::~FileContext()
{
}
{}

FileReadContext::FileReadContext(const std::filesystem::path &path,
                                 std::size_t size,

M module-services/service-desktop/include/service-desktop/ServiceDesktop.hpp => module-services/service-desktop/include/service-desktop/ServiceDesktop.hpp +4 -2
@@ 104,7 104,8 @@ class ServiceDesktop : public sys::Service

    void checkChargingCondition();

    template <typename T> auto connectHandler() -> bool
    template <typename T>
    auto connectHandler() -> bool
    {
        return connect(typeid(T), [&](sys::Message *msg) { return handle(static_cast<T *>(msg)); });
    }


@@ 127,7 128,8 @@ class ServiceDesktop : public sys::Service

namespace sys
{
    template <> struct ManifestTraits<ServiceDesktop>
    template <>
    struct ManifestTraits<ServiceDesktop>
    {
        static auto GetManifest() -> ServiceManifest
        {

M module-services/service-eink/ServiceEink.hpp => module-services/service-eink/ServiceEink.hpp +2 -1
@@ 73,7 73,8 @@ namespace service::eink

namespace sys
{
    template <> struct ManifestTraits<service::eink::ServiceEink>
    template <>
    struct ManifestTraits<service::eink::ServiceEink>
    {
        static auto GetManifest() -> ServiceManifest
        {

M module-services/service-eink/board/linux/renderer/src/RArea.hpp => module-services/service-eink/board/linux/renderer/src/RArea.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 10,7 10,8 @@
namespace Cairo
{
    class Context;
    template <class T_CppObject> class RefPtr;
    template <class T_CppObject>
    class RefPtr;
} // namespace Cairo

class RArea : public Gtk::DrawingArea

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

#pragma once


@@ 14,4 14,4 @@ namespace service::eink
        EinkMessage() : sys::DataMessage(MessageType::EinkMessage)
        {}
    };
} /* namespace seink */
} // namespace service::eink

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

#pragma once


@@ 32,4 32,4 @@ namespace service::eink
    {
        using sys::ResponseMessage::ResponseMessage;
    };
} // namespace seink
} // namespace service::eink

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

#include "EinkMessage.hpp"


@@ 32,4 32,4 @@ namespace service::eink
    {
        return contextId;
    }
} /* namespace seink */
} // namespace service::eink

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

#include <service-evtmgr/EventManagerServiceAPI.hpp>


@@ 17,7 17,6 @@ namespace sys
    class Service;
} // namespace sys


void EventManagerServiceAPI::vibrationPulseOnce(sys::Service *serv)
{
    serv->bus.sendUnicast(std::make_shared<sevm::VibratorMessage>(bsp::vibrator::Action::pulse),

M module-services/service-evtmgr/battery/BatteryController.hpp => module-services/service-evtmgr/battery/BatteryController.hpp +1 -1
@@ 18,7 18,7 @@ namespace sevm::battery
    class BatteryController
    {
      public:
        using Events = hal::battery::AbstractBatteryCharger::Events;
        using Events          = hal::battery::AbstractBatteryCharger::Events;
        using ChargerPresence = hal::battery::AbstractBatteryCharger::ChargerPresence;
        explicit BatteryController(sys::Service *service, xQueueHandle notificationChannel);


M module-services/service-evtmgr/screen-light-control/ScreenLightControl.hpp => module-services/service-evtmgr/screen-light-control/ScreenLightControl.hpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 30,7 30,7 @@ namespace screen_light_control
        [[nodiscard]] virtual auto isLightOn() const noexcept -> bool        = 0;
        [[nodiscard]] virtual auto isAutoModeOn() const noexcept -> bool     = 0;
        [[nodiscard]] virtual auto getBrightnessValue() const noexcept
            -> bsp::eink_frontlight::BrightnessPercentage = 0;
            -> bsp::eink_frontlight::BrightnessPercentage     = 0;
        [[nodiscard]] virtual auto isFadeOutOngoing() -> bool = 0;
    };
} // namespace screen_light_control

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

#pragma once


@@ 34,7 34,8 @@ namespace service

namespace sys
{
    template <> struct ManifestTraits<service::ServiceFileIndexer>
    template <>
    struct ManifestTraits<service::ServiceFileIndexer>
    {
        static auto GetManifest() -> ServiceManifest
        {

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

#pragma once


@@ 81,7 81,8 @@ namespace service::gui

namespace sys
{
    template <> struct ManifestTraits<service::gui::ServiceGUI>
    template <>
    struct ManifestTraits<service::gui::ServiceGUI>
    {
        static auto GetManifest() -> ServiceManifest
        {

M module-services/service-test/include/service-test/ServiceTest.hpp => module-services/service-test/include/service-test/ServiceTest.hpp +3 -2
@@ 33,12 33,13 @@ namespace service::test

namespace sys
{
    template <> struct ManifestTraits<service::test::ServiceTest>
    template <>
    struct ManifestTraits<service::test::ServiceTest>
    {
        static auto GetManifest() -> ServiceManifest
        {
            ServiceManifest manifest;
            manifest.name = service::name::service_test;
            manifest.name         = service::name::service_test;
            manifest.dependencies = {service::name::db};
            return manifest;
        }

M module-services/service-time/AlarmOperations.hpp => module-services/service-time/AlarmOperations.hpp +2 -1
@@ 15,7 15,8 @@

namespace alarms
{
    template <typename T> using EventsContainer = std::vector<std::unique_ptr<T>>;
    template <typename T>
    using EventsContainer = std::vector<std::unique_ptr<T>>;

    class IAlarmOperations
    {

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

#pragma once


@@ 22,10 22,10 @@ namespace alarms
    using OnGetAlarmEventsCallback = std::function<void(std::vector<AlarmEventRecord>)>;
    using OnGetAlarmEventsInRangeCallback =
        std::function<void(std::pair<std::vector<AlarmEventRecord>, std::uint32_t>)>;
    using OnAddAlarmEventCallback          = std::function<void(bool)>;
    using OnUpdateAlarmEventCallback       = std::function<void(bool)>;
    using OnRemoveAlarmEventCallback       = std::function<void(bool)>;
    using OnToggleAll                      = std::function<void(bool)>;
    using OnAddAlarmEventCallback    = std::function<void(bool)>;
    using OnUpdateAlarmEventCallback = std::function<void(bool)>;
    using OnRemoveAlarmEventCallback = std::function<void(bool)>;
    using OnToggleAll                = std::function<void(bool)>;

    class AbstractAlarmEventsRepository
    {

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

#include "Constants.hpp"


@@ 13,7 13,8 @@ namespace alarms

    namespace AlarmServiceAPI
    {
        template <class requestType, typename... Types> bool sendRequest(sys::Service *serv, Types... messageArgs)
        template <class requestType, typename... Types>
        bool sendRequest(sys::Service *serv, Types... messageArgs)
        {
            auto msg = std::make_shared<requestType>(messageArgs...);
            return serv->bus.sendUnicast(msg, service::name::service_time);

M module-services/service-time/ServiceTime.hpp => module-services/service-time/ServiceTime.hpp +2 -1
@@ 66,7 66,8 @@ namespace stm

namespace sys
{
    template <> struct ManifestTraits<stm::ServiceTime>
    template <>
    struct ManifestTraits<stm::ServiceTime>
    {
        static auto GetManifest() -> ServiceManifest
        {

M module-sys/PhoneModes/Observer.cpp => module-sys/PhoneModes/Observer.cpp +2 -2
@@ 20,12 20,12 @@ namespace sys::phone_modes

    void Observer::subscribe(OnPhoneModeChangedCallback &&onChange) noexcept
    {
        onPhoneModeChangedCallback           = std::move(onChange);
        onPhoneModeChangedCallback = std::move(onChange);
    }

    void Observer::subscribe(OnTetheringChangedCallback &&onChange) noexcept
    {
        onTetheringChangedCallback           = std::move(onChange);
        onTetheringChangedCallback = std::move(onChange);
    }

    bool Observer::isInMode(PhoneMode mode) const noexcept

M module-sys/Service/details/bus/Bus.cpp => module-sys/Service/details/bus/Bus.cpp +3 -2
@@ 104,7 104,8 @@ namespace sys

    namespace
    {
        template <class W, class X> void restoreMessagess(W &mailbox, X &tempMsg)
        template <class W, class X>
        void restoreMessagess(W &mailbox, X &tempMsg)
        {
            // Push messages collected during waiting for response to processing queue
            for (const auto &w : tempMsg) {


@@ 161,7 162,7 @@ namespace sys
            }

            // Immediately block on rx queue
            auto rxmsg = sender->mailbox.pop(timeoutNeeded - timeElapsed);
            auto rxmsg  = sender->mailbox.pop(timeoutNeeded - timeElapsed);
            timeElapsed = cpp_freertos::Ticks::GetTicks();

            // check for timeout

M module-sys/Service/include/Service/BusProxy.hpp => module-sys/Service/include/Service/BusProxy.hpp +4 -2
@@ 31,7 31,8 @@ namespace sys
        void sendMulticast(std::shared_ptr<Message> message, BusChannel channel);
        void sendBroadcast(std::shared_ptr<Message> message);

        template <typename Msg, typename... Params> bool sendUnicast(Params &&...params)
        template <typename Msg, typename... Params>
        bool sendUnicast(Params &&...params)
        {
            static_assert(std::is_base_of<sys::msg::Request, Msg>::value,
                          "Only sys::msg::Request can be sent via Unicast<>");


@@ 39,7 40,8 @@ namespace sys
            return sendUnicast(msg, msg->target());
        }

        template <typename Msg, typename... Params> void sendMulticast(Params &&...params)
        template <typename Msg, typename... Params>
        void sendMulticast(Params &&...params)
        {
            static_assert(std::is_base_of<sys::msg::Notification, Msg>::value,
                          "Only sys::msg::Notification can be sent via Multicast<>");

M module-sys/Service/include/Service/Mailbox.hpp => module-sys/Service/include/Service/Mailbox.hpp +2 -1
@@ 35,7 35,8 @@ class ServiceLock
    }
};

template <typename T, typename Base = cpp_freertos::Thread *, typename Lock = ServiceLock> class Mailbox
template <typename T, typename Base = cpp_freertos::Thread *, typename Lock = ServiceLock>
class Mailbox
{
  public:
    Mailbox(Base thread) : thread_(thread)

M module-sys/Service/include/Service/Service.hpp => module-sys/Service/include/Service/Service.hpp +2 -1
@@ 34,7 34,8 @@ namespace sys
        {}
    };

    template <typename Request, typename Response> struct Async
    template <typename Request, typename Response>
    struct Async
    {
        enum class State
        {

M module-sys/Service/include/Service/ServiceCreator.hpp => module-sys/Service/include/Service/ServiceCreator.hpp +5 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 40,7 40,8 @@ namespace sys
        ServiceManifest manifest;
    };

    template <typename T, typename... Args> class ServiceCreator : public BaseServiceCreator
    template <typename T, typename... Args>
    class ServiceCreator : public BaseServiceCreator
    {
      public:
        using BaseServiceCreator::BaseServiceCreator;


@@ 65,7 66,8 @@ namespace sys
     * @param args      Parameter pack that is to be forwarded to the service constructor.
     * @return ServiceCreator for Service T.
     */
    template <typename T, typename... Args> std::unique_ptr<BaseServiceCreator> CreatorFor(Args &&...args) noexcept
    template <typename T, typename... Args>
    std::unique_ptr<BaseServiceCreator> CreatorFor(Args &&...args) noexcept
    {
        if constexpr (sizeof...(args)) {
            static_assert(not std::is_reference_v<Args...>,

M module-sys/Service/include/Service/ServiceManifest.hpp => module-sys/Service/include/Service/ServiceManifest.hpp +7 -4
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 23,9 23,11 @@ namespace sys
    };

    /// Type traits pattern used to enforce user-defined types to implement "GetManifest" function.
    template <class T> struct ManifestTraits;
    template <class T>
    struct ManifestTraits;

    template <class, class = void> struct HasManifest : std::false_type
    template <class, class = void>
    struct HasManifest : std::false_type
    {};

    /// Checks whether T implements "GetManifest" static method.


@@ 38,7 40,8 @@ namespace sys

    /// Retrieves the manifest of T, if T implements ManifestTraits.
    /// Otherwise, reports an error during compile time.
    template <class T, std::enable_if_t<HasManifest<T>::value, int> = 0> auto ManifestOf() -> ServiceManifest
    template <class T, std::enable_if_t<HasManifest<T>::value, int> = 0>
    auto ManifestOf() -> ServiceManifest
    {
        return ManifestTraits<T>::GetManifest();
    }

M module-sys/SystemManager/CpuGovernor.cpp => module-sys/SystemManager/CpuGovernor.cpp +1 -1
@@ 30,7 30,7 @@ namespace sys
    bool CpuGovernor::RegisterNewSentinel(std::shared_ptr<CpuSentinel> newSentinel)
    {
        if (newSentinel) {
            auto isNewSentinelAlreadyRegistered = false;
            auto isNewSentinelAlreadyRegistered         = false;
            sentinel_foo checkSentinelAlreadyRegistered = [&](const std::shared_ptr<CpuSentinel> &s) -> bool {
                if (s->GetName() == newSentinel->GetName()) {
                    isNewSentinelAlreadyRegistered = true;

M module-sys/SystemManager/CpuSentinel.cpp => module-sys/SystemManager/CpuSentinel.cpp +1 -1
@@ 51,7 51,7 @@ namespace sys

    [[nodiscard]] auto CpuSentinel::GetFrequency() const noexcept -> bsp::CpuFrequencyMHz
    {
            return currentFrequency;
        return currentFrequency;
    }

    void CpuSentinel::CpuFrequencyHasChanged(bsp::CpuFrequencyMHz newFrequency)

M module-sys/SystemManager/CpuStatistics.cpp => module-sys/SystemManager/CpuStatistics.cpp +2 -2
@@ 63,8 63,8 @@ namespace sys

    void CpuStatistics::UpdatePercentageCpuLoad()
    {
        uint32_t idleTickCount  = xTaskGetIdleRunTimeCounter();
        uint32_t totalTickCount = ulHighFrequencyTimerTicks();
        uint32_t idleTickCount     = xTaskGetIdleRunTimeCounter();
        uint32_t totalTickCount    = ulHighFrequencyTimerTicks();
        uint32_t idleTickIncrease  = ComputeIncrease(idleTickCount, lastIdleTickCount);
        uint32_t totalTickIncrease = ComputeIncrease(totalTickCount, lastTotalTickCount);
        lastIdleTickCount          = idleTickCount;

M module-sys/SystemManager/SystemManagerCommon.cpp => module-sys/SystemManager/SystemManagerCommon.cpp +4 -2
@@ 87,7 87,8 @@ namespace sys
                                                     service::name::service_desktop};
        }

        template <typename T> static bool isOnWhitelist(const T &list, const std::string &serviceName)
        template <typename T>
        static bool isOnWhitelist(const T &list, const std::string &serviceName)
        {
            return std::find(std::begin(list), std::end(list), serviceName) != std::end(list);
        }


@@ 383,7 384,8 @@ namespace sys
        return true;
    }

    template <typename T> void SystemManagerCommon::DestroyServices(const T &whitelist)
    template <typename T>
    void SystemManagerCommon::DestroyServices(const T &whitelist)
    {
        cpp_freertos::LockGuard lck(serviceDestroyMutex);
        for (auto service = servicesList.begin(); service != servicesList.end();) {

M module-sys/SystemManager/cpu/algorithm/FrequencyStepping.hpp => module-sys/SystemManager/cpu/algorithm/FrequencyStepping.hpp +2 -2
@@ 17,8 17,8 @@ namespace sys::cpu
    {
        const bsp::PowerProfile &powerProfile;
        CpuGovernor &cpuGovernor;
        unsigned int aboveThresholdCounter = 0;
        unsigned int belowThresholdCounter = 0;
        unsigned int aboveThresholdCounter    = 0;
        unsigned int belowThresholdCounter    = 0;
        bool isFrequencyDownscalingInProgress = true;

      public:

M module-sys/SystemManager/include/SystemManager/SystemManagerCommon.hpp => module-sys/SystemManager/include/SystemManager/SystemManagerCommon.hpp +2 -1
@@ 163,7 163,8 @@ namespace sys
        static bool RunService(std::shared_ptr<Service> service, Service *caller, TickType_t timeout = 5000);
        static bool RequestServiceClose(const std::string &name, Service *caller, TickType_t timeout = 5000);

        template <typename T> void DestroyServices(const T &whitelist);
        template <typename T>
        void DestroyServices(const T &whitelist);
        /// Sysmgr stores list of all active services but some of them are under control of parent services.
        /// Parent services ought to manage lifetime of child services hence we are sending DestroyRequests only to
        /// parents.

M module-sys/common/include/system/messages/RequestCpuFrequencyMessage.hpp => module-sys/common/include/system/messages/RequestCpuFrequencyMessage.hpp +1 -2
@@ 33,8 33,7 @@ namespace sys
    };

    class HoldCpuFrequencyPermanentlyResponse : public sys::ResponseMessage
    {
    };
    {};

    class ReleaseCpuPermanentFrequencyMessage : public sys::DataMessage
    {};

M module-utils/log/api/log/log.hpp => module-utils/log/api/log/log.hpp +1 -1
@@ 72,7 72,7 @@ extern "C"
/**
 * Log functions (one per level).
 */
#define LOG_PRINTF(...)              log_Printf(__VA_ARGS__)
#define LOG_PRINTF(...) log_Printf(__VA_ARGS__)
#ifndef LOG_IGNORE_ALL
#define LOG_TRACE(...)               log_Log(LOGTRACE, __FILENAME__, __LINE__, __func__, __VA_ARGS__)
#define LOG_DEBUG(...)               log_Log(LOGDEBUG, __FILENAME__, __LINE__, __func__, __VA_ARGS__)

M module-utils/phonenumber/NumberHolderMatcher.hpp => module-utils/phonenumber/NumberHolderMatcher.hpp +2 -1
@@ 15,7 15,8 @@ namespace utils
     * @tparam STL container
     * @tparam Number holder class
     */
    template <template <class, class> class C, class THolder> class NumberHolderMatcher
    template <template <class, class> class C, class THolder>
    class NumberHolderMatcher
    {
      public:
        using NumbersProvider =

M module-utils/rotator/include/rotator/Rotator.hpp => module-utils/rotator/include/rotator/Rotator.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 8,7 8,8 @@

namespace utils
{
    template <std::size_t maxRotationFilesCount> class Rotator
    template <std::size_t maxRotationFilesCount>
    class Rotator
    {
      protected:
        const std::string extension;

M module-utils/time/test/unittest_TimeZone.cpp => module-utils/time/test/unittest_TimeZone.cpp +6 -6
@@ 29,7 29,7 @@ TEST_CASE("TimeZone parser")
    SECTION("Checking the time zone rules for Warsaw")
    {
        std::string zone{"Warsaw"};
        auto rules  = utils::time::getTimeZoneRules(zone);
        auto rules        = utils::time::getTimeZoneRules(zone);
        auto summerOffset = utils::time::getTimeZoneOffset(zone, summerTime);
        auto winterOffset = utils::time::getTimeZoneOffset(zone, winterTime);



@@ 41,7 41,7 @@ TEST_CASE("TimeZone parser")
    SECTION("Checking the time zone rules for London")
    {
        std::string zone{"London"};
        auto rules  = utils::time::getTimeZoneRules(zone);
        auto rules        = utils::time::getTimeZoneRules(zone);
        auto summerOffset = utils::time::getTimeZoneOffset(zone, summerTime);
        auto winterOffset = utils::time::getTimeZoneOffset(zone, winterTime);



@@ 53,7 53,7 @@ TEST_CASE("TimeZone parser")
    SECTION("Checking the time zone rules for New York")
    {
        std::string zone{"New York"};
        auto rules  = utils::time::getTimeZoneRules(zone);
        auto rules        = utils::time::getTimeZoneRules(zone);
        auto summerOffset = utils::time::getTimeZoneOffset(zone, summerTime);
        auto winterOffset = utils::time::getTimeZoneOffset(zone, winterTime);



@@ 65,7 65,7 @@ TEST_CASE("TimeZone parser")
    SECTION("Checking the time zone rules for Tehran")
    {
        std::string zone{"Tehran"};
        auto rules  = utils::time::getTimeZoneRules(zone);
        auto rules        = utils::time::getTimeZoneRules(zone);
        auto summerOffset = utils::time::getTimeZoneOffset(zone, summerTime);
        auto winterOffset = utils::time::getTimeZoneOffset(zone, winterTime);



@@ 77,7 77,7 @@ TEST_CASE("TimeZone parser")
    SECTION("Checking the time zone rules for Auckland")
    {
        std::string zone{"Auckland"};
        auto rules  = utils::time::getTimeZoneRules(zone);
        auto rules        = utils::time::getTimeZoneRules(zone);
        auto summerOffset = utils::time::getTimeZoneOffset(zone, summerTime);
        auto winterOffset = utils::time::getTimeZoneOffset(zone, winterTime);



@@ 89,7 89,7 @@ TEST_CASE("TimeZone parser")
    SECTION("Checking the time zone rules for unknown zone")
    {
        std::string zone{"unknown"};
        auto rules  = utils::time::getTimeZoneRules(zone);
        auto rules        = utils::time::getTimeZoneRules(zone);
        auto summerOffset = utils::time::getTimeZoneOffset(zone, summerTime);
        auto winterOffset = utils::time::getTimeZoneOffset(zone, winterTime);


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

#pragma once


@@ 8,7 8,8 @@

namespace utils
{
    template <typename Out> void split(const std::string &s, char delim, Out result)
    template <typename Out>
    void split(const std::string &s, char delim, Out result)
    {
        std::stringstream ss(s);
        std::string item;

M module-utils/utility/Utils.hpp => module-utils/utility/Utils.hpp +27 -14
@@ 18,26 18,31 @@

namespace utils
{
    inline constexpr auto WHITESPACE = " \n\r\t\f\v";
    inline constexpr auto WHITESPACE       = " \n\r\t\f\v";
    constexpr unsigned int secondsInMinute = 60;

    template <typename T> inline constexpr bool is_byte_v = std::is_integral_v<T> && sizeof(T) == sizeof(std::uint8_t);
    template <typename T>
    inline constexpr bool is_byte_v = std::is_integral_v<T> && sizeof(T) == sizeof(std::uint8_t);

    template <typename T> using remove_cref_t = std::remove_const_t<std::remove_reference_t<T>>;
    template <typename T>
    using remove_cref_t = std::remove_const_t<std::remove_reference_t<T>>;

    // NOTE: With short string optimization storing one byte hex in std::string is probably fine

    template <typename T, std::enable_if_t<is_byte_v<T>, int> = 0> inline char halfByteToHex(T c)
    template <typename T, std::enable_if_t<is_byte_v<T>, int> = 0>
    inline char halfByteToHex(T c)
    {
        return c < 10 ? '0' + c : 'a' + (c - 10);
    }

    template <typename T, std::enable_if_t<is_byte_v<T>, int> = 0> inline std::string byteToHex(T c)
    template <typename T, std::enable_if_t<is_byte_v<T>, int> = 0>
    inline std::string byteToHex(T c)
    {
        return {halfByteToHex<std::uint8_t>((c & 0xF0) >> 4), halfByteToHex<std::uint8_t>(c & 0x0F)};
    }

    template <typename T = std::uint8_t, std::enable_if_t<is_byte_v<T>, int> = 0> inline T halfHexToByte(char c)
    template <typename T = std::uint8_t, std::enable_if_t<is_byte_v<T>, int> = 0>
    inline T halfHexToByte(char c)
    {
        if (c >= '0' && c <= '9') {
            return c - '0';


@@ 122,12 127,14 @@ namespace utils
        return base;
    }

    template <typename T> [[nodiscard]] inline std::string to_string(T t)
    template <typename T>
    [[nodiscard]] inline std::string to_string(T t)
    {
        return std::to_string(t);
    }

    template <> [[nodiscard]] inline std::string to_string<long double>(long double t)
    template <>
    [[nodiscard]] inline std::string to_string<long double>(long double t)
    {
        uint32_t precision = 6;
        int base           = static_cast<int>(t);


@@ 163,31 170,36 @@ namespace utils
        return baseAsStr + "." + fractionalAsStr;
    }

    template <> [[nodiscard]] inline std::string to_string<float>(float t)
    template <>
    [[nodiscard]] inline std::string to_string<float>(float t)
    {
        return to_string(static_cast<long double>(t));
    }

    template <> [[nodiscard]] inline std::string to_string<double>(double t)
    template <>
    [[nodiscard]] inline std::string to_string<double>(double t)
    {
        return to_string(static_cast<long double>(t));
    }

    template <> [[nodiscard]] inline std::string to_string<std::int64_t>(std::int64_t value)
    template <>
    [[nodiscard]] inline std::string to_string<std::int64_t>(std::int64_t value)
    {
        std::ostringstream ss;
        ss << value;
        return ss.str();
    }

    template <> [[nodiscard]] inline std::string to_string<std::uint64_t>(std::uint64_t value)
    template <>
    [[nodiscard]] inline std::string to_string<std::uint64_t>(std::uint64_t value)
    {
        std::ostringstream ss;
        ss << value;
        return ss.str();
    }

    template <typename T> [[nodiscard]] const std::string enumToString(const T &t)
    template <typename T>
    [[nodiscard]] const std::string enumToString(const T &t)
    {
        static_assert(std::is_enum_v<T>);
        return std::string(magic_enum::enum_name(t));


@@ 197,7 209,8 @@ namespace utils
    ///
    /// @param value to be converted
    /// @return Value casted to type T
    template <typename T> [[nodiscard]] T getNumericValue(const std::string &value)
    template <typename T>
    [[nodiscard]] T getNumericValue(const std::string &value)
    {
        static_assert(std::is_arithmetic_v<T>);
        if (value.empty()) {

M module-utils/utility/ValueScaler.hpp => module-utils/utility/ValueScaler.hpp +4 -2
@@ 11,7 11,8 @@

namespace utils
{
    template <typename T> struct Range
    template <typename T>
    struct Range
    {
        T min;
        T max;


@@ 38,7 39,8 @@ namespace utils
        return static_cast<T>(std::floor(output));
    }

    template <typename T> struct Entry
    template <typename T>
    struct Entry
    {
        const Range<T> input;
        const Range<T> output;

M module-utils/utility/integer.hpp => module-utils/utility/integer.hpp +5 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 19,7 19,8 @@ namespace utils::integer
     *
     * @tparam T - type to return
     */
    template <typename T> struct TypeHolder
    template <typename T>
    struct TypeHolder
    {
        using type = T;
    };


@@ 32,7 33,8 @@ namespace utils::integer
     * @tparam Bits - number of bits which must an integer be able to hold.
     * @return integer type best suited to hold value Bits bits long.
     */
    template <unsigned int Bits> auto getIntegerType()
    template <unsigned int Bits>
    auto getIntegerType()
    {
        static_assert(Bits <= 64);


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

#include <string>


@@ 11,7 11,7 @@ namespace purefs::fs::internal
    {
        thread_local std::string cwd_per_thread;
        std::string default_cwd{"/"};
    }
    } // namespace
    auto get_thread_local_cwd_path() noexcept -> std::string_view
    {
        if (cwd_per_thread.empty()) {

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

#include <errno.h>


@@ 20,7 20,7 @@ struct __dirstream
namespace
{
    template <class Base, typename T, typename... Args>
    auto invoke_fs(int &error, T Base::*lfs_fun, Args &&... args)
    auto invoke_fs(int &error, T Base::*lfs_fun, Args &&...args)
        -> decltype((static_cast<Base *>(nullptr)->*lfs_fun)(std::forward<Args>(args)...))
    {
        auto vfs = purefs::subsystem::vfs_core();

M module-vfs/drivers/include/purefs/fs/drivers/filesystem_vfat.hpp => module-vfs/drivers/include/purefs/fs/drivers/filesystem_vfat.hpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 10,8 10,8 @@ namespace purefs::fs::drivers
    class filesystem_vfat final : public filesystem_operations
    {
      public:
        filesystem_vfat()                        = default;
        virtual ~filesystem_vfat()               = default;
        filesystem_vfat()          = default;
        virtual ~filesystem_vfat() = default;

      private:
        auto mount_prealloc(std::shared_ptr<blkdev::internal::disk_handle> diskh, std::string_view path, unsigned flags)

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

#include <memory>


@@ 27,7 27,8 @@ namespace purefs::fs::drivers
{
    namespace
    {
        template <typename T, typename... Args> auto invoke_efs(filesystem_ext4::fsfile zfil, T efs_fun, Args &&...args)
        template <typename T, typename... Args>
        auto invoke_efs(filesystem_ext4::fsfile zfil, T efs_fun, Args &&...args)
        {
            auto vfile = std::dynamic_pointer_cast<file_handle_ext4>(zfil);
            if (!vfile) {


@@ 70,7 71,8 @@ namespace purefs::fs::drivers
            auto err = efs_fun(native_path.c_str(), std::forward<Args>(args)...);
            return -err;
        }
        template <typename T, typename... Args> auto invoke_efs(filesystem_ext4::fsdir zdir, T lfs_fun, Args &&...args)
        template <typename T, typename... Args>
        auto invoke_efs(filesystem_ext4::fsdir zdir, T lfs_fun, Args &&...args)
        {
            auto vdir = std::dynamic_pointer_cast<directory_handle_ext4>(zdir);
            if (!vdir) {

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

#include <purefs/fs/drivers/filesystem_littlefs.hpp>


@@ 26,7 26,8 @@ namespace
    // NOTE: lfs block size is configured during format
    static constexpr auto c_lfs_block_size = 32U * 1024U;

    template <typename T> auto lfs_to_errno(T error) -> T
    template <typename T>
    auto lfs_to_errno(T error) -> T
    {
        if (error >= 0) {
            return error;

M module-vfs/drivers/src/purefs/fs/filesystem_vfat.cpp => module-vfs/drivers/src/purefs/fs/filesystem_vfat.cpp +2 -2
@@ 130,7 130,7 @@ namespace purefs::fs::drivers
#if FF_MAX_SS != FF_MIN_SS
            st.st_blksize = fatfs->ssize;
#else
            st.st_blksize = FF_MIN_SS;
            st.st_blksize     = FF_MIN_SS;
#endif
            st.st_blocks = fs.fsize / st.st_blksize;
            st.st_atime  = 0;


@@ 389,7 389,7 @@ namespace purefs::fs::drivers
            return -EBADF;
        }
        FILINFO finfo;
        const auto fspath = vmnt->native_path(file);
        const auto fspath                     = vmnt->native_path(file);
        static constexpr auto slash_pos       = 2U;
        static constexpr auto root_size       = 3U;
        static constexpr auto empty_root_size = 2U;

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

/*------------------------------------------------------------------------*/

M module-vfs/include/internal/purefs/vfs_subsystem_internal.hpp => module-vfs/include/internal/purefs/vfs_subsystem_internal.hpp +2 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 13,4 13,4 @@ namespace purefs::subsystem::internal
{
    auto create_default_block_device() -> std::shared_ptr<blkdev::disk>;
    auto create_default_nvm_device() -> std::shared_ptr<blkdev::disk>;
}
} // namespace purefs::subsystem::internal

M module-vfs/include/user/purefs/fs/filesystem.hpp => module-vfs/include/user/purefs/fs/filesystem.hpp +10 -9
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 48,7 48,7 @@ namespace purefs::fs
    {
        class directory_handle;
        class notifier;
    }
    } // namespace internal
    class filesystem
    {
        static constexpr auto path_separator = '/';


@@ 60,8 60,8 @@ namespace purefs::fs
        static constexpr auto first_file_descriptor = 3;

      public:
        using fsdir                    = std::shared_ptr<internal::directory_handle>;
        using fsfile                         = std::shared_ptr<internal::file_handle>;
        using fsdir  = std::shared_ptr<internal::directory_handle>;
        using fsfile = std::shared_ptr<internal::file_handle>;
        explicit filesystem(std::shared_ptr<blkdev::disk_manager> diskmm);
        ~filesystem();
        filesystem(const filesystem &) = delete;


@@ 72,7 72,8 @@ namespace purefs::fs
         * @param[in] fops Filesystem operation structure
         * @return zero on sucess otherwise error
         */
        template <typename T> auto register_filesystem(std::string_view fsname, std::shared_ptr<T> fops) -> int
        template <typename T>
        auto register_filesystem(std::string_view fsname, std::shared_ptr<T> fops) -> int
        {
            if (!fops || !std::is_convertible_v<T *, filesystem_operations *>) {
                return -EINVAL;


@@ 187,7 188,7 @@ namespace purefs::fs
            rw  //! Syscall is RW
        };
        template <class Base, class T, typename... Args>
        inline auto invoke_fops(T Base::*method, int fds, Args &&... args)
        inline auto invoke_fops(T Base::*method, int fds, Args &&...args)
            -> decltype((static_cast<Base *>(nullptr)->*method)(0, std::forward<Args>(args)...))
        {
            auto fil = find_filehandle(fds);


@@ 210,7 211,7 @@ namespace purefs::fs
        }

        template <class Base, class T, typename... Args>
        inline auto invoke_fops(iaccess acc, T Base::*method, std::string_view path, Args &&... args) const
        inline auto invoke_fops(iaccess acc, T Base::*method, std::string_view path, Args &&...args) const
            -> decltype((static_cast<Base *>(nullptr)->*method)(nullptr, {}, std::forward<Args>(args)...))
        {
            if (path.empty()) {


@@ 235,7 236,7 @@ namespace purefs::fs
        inline auto invoke_fops_same_mp(T Base::*method,
                                        std::string_view path,
                                        std::string_view path2,
                                        Args &&... args) const
                                        Args &&...args) const
            -> decltype((static_cast<Base *>(nullptr)->*method)(nullptr, {}, {}, std::forward<Args>(args)...))
        {
            if (path.empty() || path2.empty()) {


@@ 261,7 262,7 @@ namespace purefs::fs
                return -EIO;
        }
        template <class Base, class T, typename... Args>
        inline auto invoke_fops(T Base::*method, fsdir dirp, Args &&... args)
        inline auto invoke_fops(T Base::*method, fsdir dirp, Args &&...args)
            -> decltype((static_cast<Base *>(nullptr)->*method)(nullptr, std::forward<Args>(args)...))
        {
            const auto err = dirp->error();

M module-vfs/include/user/purefs/fs/handle_mapper.hpp => module-vfs/include/user/purefs/fs/handle_mapper.hpp +5 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 7,7 7,8 @@
namespace purefs::fs::internal
{

    template <typename T> class handle_mapper
    template <typename T>
    class handle_mapper
    {
      public:
        T const &operator[](std::size_t index) const


@@ 52,7 53,8 @@ namespace purefs::fs::internal
        std::vector<std::size_t> unused;
    };

    template <typename T> std::size_t handle_mapper<T>::insert(T const &value)
    template <typename T>
    std::size_t handle_mapper<T>::insert(T const &value)
    {
        if (unused.empty()) {
            data.push_back(value);

M module-vfs/paths/filesystem_paths.cpp => module-vfs/paths/filesystem_paths.cpp +11 -11
@@ 1,22 1,22 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <purefs/filesystem_paths.hpp>

namespace
{
    constexpr inline auto PATH_SYS      = "/sys";
    constexpr inline auto PATH_CONF     = "/mfgconf";
    constexpr inline auto PATH_USER     = "user";
    constexpr inline auto PATH_CURRENT  = "current";
    constexpr inline auto PATH_PREVIOUS = "previous";
    constexpr inline auto PATH_UPDATES  = "updates";
    constexpr inline auto PATH_TMP      = "tmp";
    constexpr inline auto PATH_BACKUP   = "backup";
    constexpr inline auto PATH_FACTORY  = "factory";
    constexpr inline auto PATH_SYS         = "/sys";
    constexpr inline auto PATH_CONF        = "/mfgconf";
    constexpr inline auto PATH_USER        = "user";
    constexpr inline auto PATH_CURRENT     = "current";
    constexpr inline auto PATH_PREVIOUS    = "previous";
    constexpr inline auto PATH_UPDATES     = "updates";
    constexpr inline auto PATH_TMP         = "tmp";
    constexpr inline auto PATH_BACKUP      = "backup";
    constexpr inline auto PATH_FACTORY     = "factory";
    constexpr inline auto PATH_LOGS        = "logs";
    constexpr inline auto PATH_CRASH_DUMPS = "crash_dumps";
    constexpr inline auto eMMC_disk     = PATH_SYS;
    constexpr inline auto eMMC_disk        = PATH_SYS;
} // namespace

namespace purefs

M module-vfs/paths/include/purefs/filesystem_paths.hpp => module-vfs/paths/include/purefs/filesystem_paths.hpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 26,8 26,8 @@ namespace purefs

    namespace file
    {
        constexpr inline auto boot_json = ".boot.json";
        constexpr inline auto boot_bin  = "boot.bin";
        constexpr inline auto boot_json    = ".boot.json";
        constexpr inline auto boot_bin     = "boot.bin";
        constexpr inline auto version_json = "version.json";
    } // namespace file


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


@@ 32,7 32,7 @@ namespace purefs::fs
            }
            return spath1 == spath2;
        }
    }
    } // namespace
    filesystem::filesystem(std::shared_ptr<blkdev::disk_manager> diskmm)
        : m_diskmm(diskmm), m_lock(std::make_unique<cpp_freertos::MutexRecursive>()),
          m_notifier(std::make_unique<internal::notifier>())

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

#pragma once


@@ 25,5 25,5 @@ namespace gui
            constexpr inline auto imageTopMargin    = 112;
            constexpr inline auto imageBottomMargin = 30;
        } // namespace icon
    } // namespace bell_alarm_style
    }     // namespace bell_alarm_style
} // namespace gui

M products/BellHybrid/apps/application-bell-alarm/include/application-bell-alarm/ApplicationBellAlarm.hpp => products/BellHybrid/apps/application-bell-alarm/include/application-bell-alarm/ApplicationBellAlarm.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 34,7 34,8 @@ namespace app
        }
    };

    template <> struct ManifestTraits<ApplicationBellAlarm>
    template <>
    struct ManifestTraits<ApplicationBellAlarm>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M products/BellHybrid/apps/application-bell-alarm/presenter/BellAlarmWindowPresenter.hpp => products/BellHybrid/apps/application-bell-alarm/presenter/BellAlarmWindowPresenter.hpp +3 -3
@@ 17,7 17,7 @@ namespace app::bell_alarm
        class View
        {
          public:
            virtual ~View() noexcept = default;
            virtual ~View() noexcept                                        = default;
            virtual void setAlarmTime(time_t time)                          = 0;
            virtual time_t getAlarmTime() const                             = 0;
            virtual void setTimeFormat(utils::time::Locale::TimeFormat fmt) = 0;


@@ 26,9 26,9 @@ namespace app::bell_alarm
        class Presenter : public BasePresenter<BellAlarmWindowContract::View>
        {
          public:
            virtual ~Presenter() noexcept   = default;
            virtual ~Presenter() noexcept                                           = default;
            virtual auto createData() -> void                                       = 0;
            virtual auto saveData() -> void = 0;
            virtual auto saveData() -> void                                         = 0;
            virtual auto setTimeFormat(utils::time::Locale::TimeFormat fmt) -> void = 0;
            virtual auto onBeforeShow() -> void                                     = 0;
        };

M products/BellHybrid/apps/application-bell-background-sounds/include/application-bell-background-sounds/ApplicationBellBackgroundSounds.hpp => products/BellHybrid/apps/application-bell-background-sounds/include/application-bell-background-sounds/ApplicationBellBackgroundSounds.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 51,7 51,8 @@ namespace app
        }
    };

    template <> struct ManifestTraits<ApplicationBellBackgroundSounds>
    template <>
    struct ManifestTraits<ApplicationBellBackgroundSounds>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M products/BellHybrid/apps/application-bell-background-sounds/windows/BGSoundsProgressWindow.hpp => products/BellHybrid/apps/application-bell-background-sounds/windows/BGSoundsProgressWindow.hpp +3 -3
@@ 16,10 16,10 @@ namespace gui
    class BGSoundsProgressWindow : public AppWindow, public app::bgSounds::BGSoundsProgressContract::View
    {
        std::shared_ptr<app::bgSounds::BGSoundsProgressContract::Presenter> presenter;
        gui::Text *title            = nullptr;
        gui::HBarGraph *progressBar = nullptr;
        gui::Text *title                = nullptr;
        gui::HBarGraph *progressBar     = nullptr;
        gui::TimeFixedWidget *timerText = nullptr;
        gui::BellStatusClock *time  = nullptr;
        gui::BellStatusClock *time      = nullptr;
        std::unique_ptr<BGSoundsAudioContext> audioContext;

        void buildInterface() override;

M products/BellHybrid/apps/application-bell-bedtime/include/application-bell-bedtime/ApplicationBellBedtime.hpp => products/BellHybrid/apps/application-bell-bedtime/include/application-bell-bedtime/ApplicationBellBedtime.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 39,7 39,8 @@ namespace app
        }
    };

    template <> struct ManifestTraits<ApplicationBellBedtime>
    template <>
    struct ManifestTraits<ApplicationBellBedtime>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M products/BellHybrid/apps/application-bell-main/include/application-bell-main/ApplicationBellMain.hpp => products/BellHybrid/apps/application-bell-main/include/application-bell-main/ApplicationBellMain.hpp +2 -1
@@ 53,7 53,8 @@ namespace app
        std::shared_ptr<app::home_screen::HomeScreenPresenter> homeScreenPresenter;
    };

    template <> struct ManifestTraits<ApplicationBellMain>
    template <>
    struct ManifestTraits<ApplicationBellMain>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M products/BellHybrid/apps/application-bell-meditation-timer/include/application-bell-meditation-timer/MeditationTimer.hpp => products/BellHybrid/apps/application-bell-meditation-timer/include/application-bell-meditation-timer/MeditationTimer.hpp +2 -1
@@ 49,7 49,8 @@ namespace app
        std::unique_ptr<app::meditation::models::Statistics> statisticsModel;
    };

    template <> struct ManifestTraits<MeditationTimer>
    template <>
    struct ManifestTraits<MeditationTimer>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M products/BellHybrid/apps/application-bell-meditation-timer/windows/MeditationCountdownWindow.hpp => products/BellHybrid/apps/application-bell-meditation-timer/windows/MeditationCountdownWindow.hpp +3 -3
@@ 29,10 29,10 @@ namespace gui

      private:
        std::unique_ptr<app::meditation::MeditationCountdownContract::Presenter> presenter;
        VBox *mainVBox    = nullptr;
        Arc *progress     = nullptr;
        VBox *mainVBox         = nullptr;
        Arc *progress          = nullptr;
        TimeFixedWidget *timer = nullptr;
        Text *description = nullptr;
        Text *description      = nullptr;

        void buildLayout();
        void configureTimer();

M products/BellHybrid/apps/application-bell-onboarding/include/application-bell-onboarding/ApplicationBellOnBoarding.hpp => products/BellHybrid/apps/application-bell-onboarding/include/application-bell-onboarding/ApplicationBellOnBoarding.hpp +2 -1
@@ 56,7 56,8 @@ namespace app
        void finalizeOnBoarding();
    };

    template <> struct ManifestTraits<ApplicationBellOnBoarding>
    template <>
    struct ManifestTraits<ApplicationBellOnBoarding>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M products/BellHybrid/apps/application-bell-powernap/include/application-bell-powernap/ApplicationBellPowerNap.hpp => products/BellHybrid/apps/application-bell-powernap/include/application-bell-powernap/ApplicationBellPowerNap.hpp +2 -1
@@ 50,7 50,8 @@ namespace app
        }
    };

    template <> struct ManifestTraits<ApplicationBellPowerNap>
    template <>
    struct ManifestTraits<ApplicationBellPowerNap>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M products/BellHybrid/apps/application-bell-powernap/windows/PowerNapProgressWindow.hpp => products/BellHybrid/apps/application-bell-powernap/windows/PowerNapProgressWindow.hpp +2 -2
@@ 15,9 15,9 @@ namespace gui
    class PowerNapProgressWindow : public AppWindow, public app::powernap::PowerNapProgressContract::View
    {
        std::shared_ptr<app::powernap::PowerNapProgressContract::Presenter> presenter;
        gui::HBarGraph *progressBar = nullptr;
        gui::HBarGraph *progressBar     = nullptr;
        gui::TimeFixedWidget *timerText = nullptr;
        gui::BellStatusClock *time  = nullptr;
        gui::BellStatusClock *time      = nullptr;

        void buildInterface() override;
        auto onInput(const InputEvent &inputEvent) -> bool override;

M products/BellHybrid/apps/application-bell-settings/include/application-bell-settings/ApplicationBellSettings.hpp => products/BellHybrid/apps/application-bell-settings/include/application-bell-settings/ApplicationBellSettings.hpp +2 -1
@@ 53,7 53,8 @@ namespace app
        }
    };

    template <> struct ManifestTraits<ApplicationBellSettings>
    template <>
    struct ManifestTraits<ApplicationBellSettings>
    {
        static auto GetManifest() -> manager::ApplicationManifest
        {

M products/BellHybrid/apps/application-bell-settings/models/alarm_settings/SnoozeSettingsModel.cpp => products/BellHybrid/apps/application-bell-settings/models/alarm_settings/SnoozeSettingsModel.cpp +2 -1
@@ 7,7 7,8 @@

namespace
{
    template <typename T> std::optional<T> get_helper(settings::Settings &settings, const std::string &str)
    template <typename T>
    std::optional<T> get_helper(settings::Settings &settings, const std::string &str)
    {
        const auto retStr = settings.getValue(str, settings::SettingsScope::Global);
        if (retStr.empty()) {

M products/BellHybrid/apps/common/include/common/models/AbstractSettingsModel.hpp => products/BellHybrid/apps/common/include/common/models/AbstractSettingsModel.hpp +5 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 12,7 12,8 @@ namespace app

namespace gui
{
    template <class ValueType> class AbstractSettingsModel
    template <class ValueType>
    class AbstractSettingsModel
    {
      public:
        virtual ~AbstractSettingsModel() = default;


@@ 23,7 24,8 @@ namespace gui
        {}
    };

    template <typename ValueT> class AsyncSettingsAdapter : public AbstractSettingsModel<ValueT>
    template <typename ValueT>
    class AsyncSettingsAdapter : public AbstractSettingsModel<ValueT>
    {
      public:
        std::function<void(ValueT)> onReady;

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

#pragma once


@@ 47,7 47,8 @@ namespace app::bell_settings
        void setChangesSaved() override;

      private:
        template <typename ValueT> class Adapter : public gui::AbstractSettingsModel<ValueT>
        template <typename ValueT>
        class Adapter : public gui::AbstractSettingsModel<ValueT>
        {
          public:
            void update(ValueT val)

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

#pragma once


@@ 15,7 15,8 @@ namespace app

namespace gui
{
    template <class ValueType> class SettingsModel : public AbstractSettingsModel<ValueType>
    template <class ValueType>
    class SettingsModel : public AbstractSettingsModel<ValueType>
    {
      public:
        explicit SettingsModel(sys::Service *app);

M products/BellHybrid/apps/common/include/common/widgets/list_items/details.hpp => products/BellHybrid/apps/common/include/common/widgets/list_items/details.hpp +2 -1
@@ 14,7 14,8 @@ namespace app::list_items
{
    namespace details
    {
        template <typename SpinnerType> class ListItemBase : public gui::BellSideListItemWithCallbacks
        template <typename SpinnerType>
        class ListItemBase : public gui::BellSideListItemWithCallbacks
        {
          public:
            using spinner_type = SpinnerType;

M products/BellHybrid/apps/common/src/AudioModel.cpp => products/BellHybrid/apps/common/src/AudioModel.cpp +3 -2
@@ 78,8 78,9 @@ namespace app
        playbackFinishedFlag = false;
        auto msg  = std::make_unique<service::AudioStartPlaybackRequest>(filePath, convertPlaybackType(type));
        auto task = app::AsyncRequest::createFromMessage(std::move(msg), service::audioServiceName);
        auto cb              = [_callback = callback, this](auto response) {
            auto result     = dynamic_cast<service::AudioStartPlaybackResponse *>(response);

        auto cb = [_callback = callback, this](auto response) {
            auto result = dynamic_cast<service::AudioStartPlaybackResponse *>(response);
            if (result == nullptr) {
                return false;
            }

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

#include <models/SettingsModel.hpp>


@@ 6,7 6,8 @@
#include <widgets/list_items/Fraction.hpp>
namespace gui
{
    template <class ValueType> SettingsModel<ValueType>::SettingsModel(sys::Service *app)
    template <class ValueType>
    SettingsModel<ValueType>::SettingsModel(sys::Service *app)
    {
        settings.init(service::ServiceProxy{app->weak_from_this()});
    }

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

#include "windows/BellFinishedWindow.hpp"

M products/BellHybrid/keymap/include/keymap/KeyMap.hpp => products/BellHybrid/keymap/include/keymap/KeyMap.hpp +5 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 71,13 71,15 @@ struct KeyStates
        return states.count();
    }

    template <typename... Args> bool ifOnlySet(Args... args)
    template <typename... Args>
    bool ifOnlySet(Args... args)
    {
        const auto mask = (... | [](auto x) { return KeySet{1UL << magic_enum::enum_integer(x)}; }(args));
        return (states | mask) == mask;
    }

    template <std::size_t N> bool ifOnlySet(std::array<KeyMap, N> keys)
    template <std::size_t N>
    bool ifOnlySet(std::array<KeyMap, N> keys)
    {
        const auto mask = std::accumulate(keys.begin(), keys.end(), KeySet{}, [](auto m, auto val) {
            return m | KeySet{1UL << magic_enum::enum_integer(val)};

M products/BellHybrid/services/audio/include/audio/ServiceAudio.hpp => products/BellHybrid/services/audio/include/audio/ServiceAudio.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 74,7 74,8 @@ namespace service

namespace sys
{
    template <> struct ManifestTraits<service::Audio>
    template <>
    struct ManifestTraits<service::Audio>
    {
        static auto GetManifest() -> ServiceManifest
        {

M products/BellHybrid/services/db/include/db/ServiceDB.hpp => products/BellHybrid/services/db/include/db/ServiceDB.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 37,7 37,8 @@ class ServiceDB : public ServiceDBCommon

namespace sys
{
    template <> struct ManifestTraits<ServiceDB>
    template <>
    struct ManifestTraits<ServiceDB>
    {
        static auto GetManifest() -> ServiceManifest
        {

M products/BellHybrid/services/db/tests/MeditationStatisticsTable_tests.cpp => products/BellHybrid/services/db/tests/MeditationStatisticsTable_tests.cpp +2 -1
@@ 22,7 22,8 @@ namespace
        return std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
    }

    template <typename Db> class TestDatabase
    template <typename Db>
    class TestDatabase
    {
      public:
        explicit TestDatabase(std::filesystem::path name)

M products/BellHybrid/services/evtmgr/include/evtmgr/EventManager.hpp => products/BellHybrid/services/evtmgr/include/evtmgr/EventManager.hpp +2 -1
@@ 40,7 40,8 @@ class EventManager : public EventManagerCommon

namespace sys
{
    template <> struct ManifestTraits<EventManager>
    template <>
    struct ManifestTraits<EventManager>
    {
        static auto GetManifest() -> ServiceManifest
        {

M products/BellHybrid/services/evtmgr/internal/key_sequences/AbstractKeySequence.hpp => products/BellHybrid/services/evtmgr/internal/key_sequences/AbstractKeySequence.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 9,7 9,8 @@

class AbstractKeySequence
{
    template <class Cb, class... Args> static void invoke(Cb &&callback, Args &&...args)
    template <class Cb, class... Args>
    static void invoke(Cb &&callback, Args &&...args)
    {
        if (callback) {
            callback(args...);

M products/BellHybrid/services/evtmgr/internal/key_sequences/GenericLongPressSequence.hpp => products/BellHybrid/services/evtmgr/internal/key_sequences/GenericLongPressSequence.hpp +3 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 10,7 10,8 @@
#include <chrono>
#include <memory>

template <KeyMap... keys> class GenericLongPressSequence : public AbstractKeySequence
template <KeyMap... keys>
class GenericLongPressSequence : public AbstractKeySequence
{
    using Keys = std::array<KeyMap, sizeof...(keys)>;
    enum class State

M products/PurePhone/services/db/include/db/ServiceDB.hpp => products/PurePhone/services/db/include/db/ServiceDB.hpp +2 -1
@@ 75,7 75,8 @@ class ServiceDB : public ServiceDBCommon

namespace sys
{
    template <> struct ManifestTraits<ServiceDB>
    template <>
    struct ManifestTraits<ServiceDB>
    {
        static auto GetManifest() -> ServiceManifest
        {

M products/PurePhone/services/desktop/endpoints/messages/MessageHelper.cpp => products/PurePhone/services/desktop/endpoints/messages/MessageHelper.cpp +0 -1
@@ 34,7 34,6 @@
#include <service-db/DBServiceAPI.hpp>
#include <utf8/UTF8.hpp>


namespace sdesktop::endpoints
{
    using sender::putToSendQueue;

M products/PurePhone/services/evtmgr/backlight-handler/BacklightHandler.cpp => products/PurePhone/services/evtmgr/backlight-handler/BacklightHandler.cpp +2 -2
@@ 15,10 15,10 @@ namespace backlight
{
    namespace timers
    {
        constexpr auto keypadLightTimerName    = "KeypadLightTimer";
        constexpr auto keypadLightTimerName      = "KeypadLightTimer";
        constexpr auto lightTimerTimeoutUnlocked = std::chrono::seconds(20);
        constexpr auto lightTimerTimeoutLocked   = std::chrono::seconds(5);
        constexpr auto lightFadeoutTimerTimeout = std::chrono::seconds(10);
        constexpr auto lightFadeoutTimerTimeout  = std::chrono::seconds(10);
    } // namespace timers

    namespace

M products/PurePhone/services/evtmgr/include/evtmgr/EventManager.hpp => products/PurePhone/services/evtmgr/include/evtmgr/EventManager.hpp +2 -1
@@ 42,7 42,8 @@ class EventManager : public EventManagerCommon

namespace sys
{
    template <> struct ManifestTraits<EventManager>
    template <>
    struct ManifestTraits<EventManager>
    {
        static auto GetManifest() -> ServiceManifest
        {

M products/PurePhone/services/evtmgr/screen-light-control/ScreenLightControl.cpp => products/PurePhone/services/evtmgr/screen-light-control/ScreenLightControl.cpp +1 -1
@@ 199,4 199,4 @@ namespace pure::screen_light_control
        return fadeOut;
    }

} // namespace screen_light_control
} // namespace pure::screen_light_control