~aleteoryx/muditaos

edfe8ac0f913e471ccb28e413d7ac71622da3568 — Marcin Zieliński 3 years ago c92e5b3
[MOS-612] Fix typos about incoming calls

Ditto
M module-services/service-cellular/call/CallMachine.hpp => module-services/service-cellular/call/CallMachine.hpp +3 -3
@@ 79,7 79,7 @@ namespace call
    {
        void operator()(Dependencies &di, CallData &call)
        {
            di.multicast->notifyIncommingCall();
            di.multicast->notifyIncomingCall();
            di.db->startCall(call.record);
            di.gui->notifyRING();
            di.audio->play();


@@ 150,7 150,7 @@ namespace call
        }
    } constexpr HandleDND_Reject;

    /// when we have ongoing call - handle incomming CLIP information
    /// when we have ongoing call - handle incoming CLIP information
    /// this happens when we answer call before first CLIP is received
    struct HandleAddID
    {


@@ 167,7 167,7 @@ namespace call
    {
        void operator()(Dependencies &di, CallData &call)
        {
            if (not di.modem->answerIncommingCall()) {
            if (not di.modem->answerIncomingCall()) {
                throw std::runtime_error("modem failure!");
            }
            di.audio->routingStart();

M module-services/service-cellular/call/api/CallMulticast.cpp => module-services/service-cellular/call/api/CallMulticast.cpp +1 -1
@@ 4,7 4,7 @@
#include "CallMulticast.hpp"
#include "service-cellular/CellularMessage.hpp"

void CallMulticast::notifyIncommingCall()
void CallMulticast::notifyIncomingCall()
{
    owner->bus.sendMulticast(std::make_shared<cellular::IncomingCallMessage>(),
                             sys::BusChannel::ServiceCellularNotifications);

M module-services/service-cellular/call/api/CallMulticast.hpp => module-services/service-cellular/call/api/CallMulticast.hpp +2 -2
@@ 16,7 16,7 @@ namespace call::api
    class Multicast
    {
      public:
        virtual void notifyIncommingCall()                                        = 0;
        virtual void notifyIncomingCall()                                                      = 0;
        virtual void notifyIdentifiedCall(const utils::PhoneNumber::View &number) = 0;
        virtual void notifyCallActive()                                           = 0;
        virtual void notifyCallAborted()                                          = 0;


@@ 36,7 36,7 @@ class CallMulticast : public call::api::Multicast
  public:
    explicit CallMulticast(sys::Service *owner) : owner(owner)
    {}
    void notifyIncommingCall() override;
    void notifyIncomingCall() override;
    void notifyIdentifiedCall(const utils::PhoneNumber::View &number) override;
    void notifyCallActive() override;
    void notifyCallAborted() override;

M module-services/service-cellular/call/api/ModemCallApi.cpp => module-services/service-cellular/call/api/ModemCallApi.cpp +1 -1
@@ 12,7 12,7 @@ namespace cellular
    Api::Api(ServiceCellular *cellular, CellularMux *cmux) : cellular(cellular), cmux(cmux)
    {}

    bool Api::answerIncommingCall()
    bool Api::answerIncomingCall()
    {
        if (cmux == nullptr) {
            throw std::runtime_error("call api not initialized");

M module-services/service-cellular/call/api/ModemCallApi.hpp => module-services/service-cellular/call/api/ModemCallApi.hpp +2 -2
@@ 14,7 14,7 @@ namespace call::api
    class Api
    {
      public:
        virtual bool answerIncommingCall()            = 0;
        virtual bool answerIncomingCall()                  = 0;
        virtual bool hangupCall()                     = 0;
        virtual bool rejectCall()                     = 0;
        virtual bool areCallsFromFavouritesEnabled()  = 0;


@@ 36,7 36,7 @@ namespace cellular
        Api() = default;
        Api(ServiceCellular *cellular, CellularMux *);

        bool answerIncommingCall() override;
        bool answerIncomingCall() override;
        bool hangupCall() override;
        bool rejectCall() override;
        bool areCallsFromFavouritesEnabled() override;

M module-services/service-cellular/call/doc/README.md => module-services/service-cellular/call/doc/README.md +1 -1
@@ 4,7 4,7 @@ Call documentation
MuditaOS's call library is able to perform:
- ingoring and outgoing calls
- perform call filtering
    - on RING (notification that there is incomming call)
    - on RING (notification that there is incoming call)
    - on CLIP (notification on identified call)
    - based on contacts
    - based on phone mode

M module-services/service-cellular/call/tests/test-CallMachine.cpp => module-services/service-cellular/call/tests/test-CallMachine.cpp +5 -5
@@ 43,7 43,7 @@ namespace mocks
    auto multicast()
    {
        fakeit::Mock<call::api::Multicast> multicast;
        fakeit::When(Method(multicast, notifyIncommingCall)).AlwaysReturn();
        fakeit::When(Method(multicast, notifyIncomingCall)).AlwaysReturn();
        fakeit::When(Method(multicast, notifyIdentifiedCall)).AlwaysReturn();
        fakeit::When(Method(multicast, notifyCallActive)).AlwaysReturn();
        fakeit::When(Method(multicast, notifyCallAborted)).AlwaysReturn();


@@ 83,7 83,7 @@ namespace mocks
    auto api(bool dnd = false, bool tethering = false)
    {
        fakeit::Mock<call::api::Api> api;
        fakeit::When(Method(api, answerIncommingCall)).AlwaysReturn(true);
        fakeit::When(Method(api, answerIncomingCall)).AlwaysReturn(true);
        fakeit::When(Method(api, hangupCall)).AlwaysReturn(true);
        fakeit::When(Method(api, rejectCall)).AlwaysReturn(true);
        fakeit::When(Method(api, areCallsFromFavouritesEnabled)).AlwaysReturn(true);


@@ 139,7 139,7 @@ namespace mocks
} // namespace mocks

// ----------------------------------
// INCOMMING CALL TESTS - mode normal
// INCOMING CALL TESTS - mode normal
// ----------------------------------

TEST_CASE("base positive call flow, answered, end from caller")


@@ 300,7 300,7 @@ TEST_CASE("call missed on PURE after CLIP")
}

// ---------------------------------
// INCOMMING CALL TESTS - mode dnd
// INCOMING CALL TESTS - mode dnd
// ---------------------------------

TEST_CASE("call incoming - dnd - not favourite")


@@ 349,7 349,7 @@ TEST_CASE("call incoming - dnd - in favourite - calls from favourites enabled")
    REQUIRE(machine->machine.is("HaveId"_s));
}

TEST_CASE("call incomming - proper date")
TEST_CASE("call incoming - proper date")
{
    auto di      = mocks::DIWrapper();
    auto machine = std::make_unique<call::StateMachine>(di.get());