~aleteoryx/muditaos

ce3676ba47ae3d4d674d7365d0f0701ee6c6b4c0 — Maciej Janicki 4 years ago 798a2fb
[EGD-6796] Fix excesive ATA command with HSP

This commit fixes excesive ATA cmd in HSP by checking call type in
ServiceCellular.
M module-services/service-cellular/ServiceCellular.cpp => module-services/service-cellular/ServiceCellular.cpp +4 -0
@@ 1913,6 1913,10 @@ void ServiceCellular::apnListChanged(const std::string &value)
auto ServiceCellular::handleCellularAnswerIncomingCallMessage(CellularMessage *msg)
    -> std::shared_ptr<CellularResponseMessage>
{
    if (ongoingCall.getType() != CallType::CT_INCOMING) {
        return std::make_shared<CellularResponseMessage>(true);
    }

    auto channel = cmux->get(CellularMux::Channel::Commands);
    auto ret     = false;
    if (channel) {

M module-services/service-cellular/service-cellular/CellularCall.hpp => module-services/service-cellular/service-cellular/CellularCall.hpp +6 -0
@@ 92,6 92,12 @@ namespace CellularCall
        {
            return isActiveCall;
        }

        [[nodiscard]] CallType getType() const noexcept
        {
            return call.type;
        }

        void setCpuSentinel(std::shared_ptr<sys::CpuSentinel> sentinel);
    };
} // namespace CellularCall