Added routing in incoming call.

This commit is contained in:
Robert Borzecki committed 2019-08-07 07:16:31 +02:00
1 parent 841bf4407a
commit fd3c4b8b15
3 files changed
+21 -7

No files matched your search

@@ -75,7 +75,11 @@ sys::Message_t ApplicationCall::DataReceivedHandler(sys::DataMessage* msgl) {
}
else if( msg->type == CellularNotificationMessage::Type::IncomingCall ) {
LOG_INFO("---------------------------------IncomingCall");
if( callWindow->getState() == gui::CallWindow::State::INCOMING_CALL ) {
LOG_INFO("ignoring call incoming");
}
AudioServiceAPI::RoutingStart(this);
AudioServiceAPI::RoutingSpeakerPhone(this,true);
runCallTimer();
std::unique_ptr<gui::SwitchData> data = std::make_unique<app::IncommingCallData>(msg->data);
//send to itself message to switch (run) call application
@@ -83,7 +87,7 @@ sys::Message_t ApplicationCall::DataReceivedHandler(sys::DataMessage* msgl) {
switchWindow( "CallWindow",0, std::move(data) );
}
else {
callWindow->setState( gui::CallWindow::State::INCOMMING_CALL );
callWindow->setState( gui::CallWindow::State::INCOMING_CALL );
sapm::ApplicationManager::messageSwitchApplication( this, "ApplicationCall", "CallWindow", std::move(data) );
}
}