From 7f42542deb1a517333af9b9795f2cdeccddc03c9 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Mon, 16 Apr 2018 11:47:48 +0200 Subject: [PATCH] fix(CoreHandlers): do not display notification on call received when auto answer is enabled with no delay --- src/components/core/CoreHandlers.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/core/CoreHandlers.cpp b/src/components/core/CoreHandlers.cpp index b33186981..972b4cff0 100644 --- a/src/components/core/CoreHandlers.cpp +++ b/src/components/core/CoreHandlers.cpp @@ -102,7 +102,13 @@ void CoreHandlers::onCallStateChanged ( ) { emit callStateChanged(call, state); - if (call->getState() == linphone::CallStateIncomingReceived) + SettingsModel *settingsModel = CoreManager::getInstance()->getSettingsModel(); + if ( + call->getState() == linphone::CallStateIncomingReceived && ( + !settingsModel->getAutoAnswerStatus() || + settingsModel->getAutoAnswerDelay() > 0 + ) + ) App::getInstance()->getNotifier()->notifyReceivedCall(call); }