~aleteoryx/muditaos

ref: ad0936f11b7044aa0370873c7f7a567f0f1437fe muditaos/module-services/service-cellular/call/CallRingGuard.cpp -rw-r--r-- 666 bytes
ad0936f1 — Pawel Olejniczak [MOS-16] Change favourite contacts font to regular 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// 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/call/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();
}

bool callDNDGuard(CellularCall::Call &call)
{
    return call.mode == sys::phone_modes::PhoneMode::DoNotDisturb;
}