~aleteoryx/muditaos

ref: f7f5bc377ad45f735777096c9edddeeae453b671 muditaos/module-services/service-cellular/CallRingGuard.cpp -rw-r--r-- 534 bytes
f7f5bc37 — Adam Dobrowolski [EGD-8208] Added stop audio route on async response 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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::Call &call)
{
    return call.mode == sys::phone_modes::PhoneMode::Connected;
}

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