Files
MuditaOS/module-bluetooth/Bluetooth/interface/profiles/PhoneInterface.cpp
Bartosz Cichocki 37171538c9 [EGD-7873] Fix call ended screen during BT connecting
Some devices were sending hangup message during connecting, which caused
call ended screen - now it's disabled unless a call has been picked up
2021-11-25 14:50:45 +01:00

30 lines
853 B
C++

// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "PhoneInterface.hpp"
#include "service-audio/AudioServiceAPI.hpp"
#include "service-cellular/CellularServiceAPI.hpp"
namespace bluetooth
{
bool CellularInterfaceImpl::answerIncomingCall(sys::Service *service)
{
callActive = true;
return CellularServiceAPI::AnswerIncomingCall(service);
}
bool CellularInterfaceImpl::hangupCall(sys::Service *service)
{
if (callActive) {
callActive = false;
return CellularServiceAPI::HangupCall(service);
}
return true;
}
bool AudioInterfaceImpl::startAudioRouting(sys::Service *service)
{
return AudioServiceAPI::RoutingStart(service);
}
} // namespace bluetooth