~aleteoryx/muditaos

ref: 2cf6bd69621ceef27f13354315e430dec6a62636 muditaos/module-services/service-cellular/CallRingGuard.cpp -rw-r--r-- 508 bytes
2cf6bd69 — Adam Dobrowolski [EGD-8208] Removed unused ping, added simple Async 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "CallRingGuard.hpp"
#include "service-cellular/CellularCall.hpp"

bool callRingGuard(CellularCall::CellularCall &call)
{
    return call.mode == sys::phone_modes::PhoneMode::Connected ||
           (call.mode == sys::phone_modes::PhoneMode::DoNotDisturb && call.operations.areCallsFromFavouritesEnabled() &&
            call.operations.isNumberInFavourites());
}