~aleteoryx/muditaos

50cd42b567ebd7decd130e7d29e2569a13be27ad — Tomasz Sobkowiak 4 years ago f96a1be
[EGD-6544] Switch for VoLTE

Turn off/on VoLTE during compilation
M module-apps/CMakeLists.txt => module-apps/CMakeLists.txt +5 -0
@@ 105,6 105,11 @@ if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
    endforeach()
endif()

option(ENABLE_VOLTE "Enable VoLTE" OFF)
if(${ENABLE_VOLTE})
    target_compile_definitions(${PROJECT_NAME} PUBLIC ENABLE_VOLTE=1)
endif()

include_directories( ../module-sys )
include_directories( ../module-utils )
include_directories( ../module-services )

M module-apps/application-settings-new/windows/NetworkWindow.cpp => module-apps/application-settings-new/windows/NetworkWindow.cpp +3 -2
@@ 45,7 45,6 @@ namespace gui
            break;
        }
        auto operatorsOn = operatorsSettings->getOperatorsOn();
        auto voLteOn     = operatorsSettings->getVoLTEOn();

        optList.emplace_back(std::make_unique<gui::option::OptionSettings>(
            utils::translate("app_settings_network_active_card") + ":" + simStr + " / " + phoneNumber,


@@ 114,6 113,8 @@ namespace gui
            nullptr,
            nullptr));

#if ENABLE_VOLTE == 1
        auto voLteOn = operatorsSettings->getVoLTEOn();
        optList.emplace_back(std::make_unique<gui::option::OptionSettings>(
            utils::translate("app_settings_network_voice_over_lte"),
            [=](gui::Item &item) {


@@ 124,7 125,7 @@ namespace gui
            nullptr,
            nullptr,
            voLteOn ? gui::option::SettingRightItem::On : gui::option::SettingRightItem::Off));

#endif // ENABLE_VOLTE
        optList.emplace_back(std::make_unique<gui::option::OptionSettings>(
            utils::translate("app_settings_network_apn_settings"),
            [=](gui::Item &item) {

M module-services/service-cellular/NetworkSettings.cpp => module-services/service-cellular/NetworkSettings.cpp +1 -3
@@ 191,7 191,6 @@ std::optional<std::pair<at::response::qcfg_ims::IMSState, at::response::qcfg_ims

at::Result::Code NetworkSettings::setVoLTEState(VoLTEState state)
{

    /**
     * VoLTE On scenario
     * 1^) auto select off


@@ 226,6 225,7 @@ at::Result::Code NetworkSettings::setVoLTEState(VoLTEState state)
    }
    LOG_DEBUG("Modem soft reboot");
    cellularService.resetCellularModule(ServiceCellular::ResetType::SoftReset);

    return at::Result::Code::OK;
}



@@ 249,7 249,6 @@ VoLTEState NetworkSettings::getVoLTEState()

std::string NetworkSettings::printVoLTEDebug()
{

    auto channel = cellularService.cmux->get(CellularMux::Channel::Commands);
    if (channel) {
        auto resp = channel->cmd("AT+QVOLTEDBG");


@@ 262,6 261,5 @@ std::string NetworkSettings::printVoLTEDebug()
            return buffer;
        }
    }

    return {};
}