From 6471bac90124bdabd64c27db4003eea24a0c2a27 Mon Sep 17 00:00:00 2001 From: Adam Dobrowolski Date: Mon, 24 Jan 2022 11:11:45 +0100 Subject: [PATCH] [EGD-8166] Private Number instead proper number shown on screen Race condition workaround --- module-apps/application-call/ApplicationCall.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/module-apps/application-call/ApplicationCall.cpp b/module-apps/application-call/ApplicationCall.cpp index 76fc3f5c153f55b48413c3d84d83173959e7bb16..bcbf587fa9f68bcf6d38e194dcb40cafef502998 100644 --- a/module-apps/application-call/ApplicationCall.cpp +++ b/module-apps/application-call/ApplicationCall.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include "ApplicationCall.hpp" @@ -207,7 +207,10 @@ namespace app void ApplicationCall::handleCallerId(const app::manager::actions::CallParams *params) { - if (getCallState() != call::State::IDLE) { + /// there is race condition in this code, we require `INCOMMING_CALL` state check due to it. + /// alternatively we would require rewritting this application state handling + if (getCallState() != call::State::IDLE && getCallState() != app::call::State::INCOMING_CALL) { + LOG_ERROR("call id not handled"); return; } if (callerIdTimer.isValid()) {