From bf305043a9f89f63ef67efc54302ede7513a149b Mon Sep 17 00:00:00 2001 From: Kuba Date: Tue, 25 Jan 2022 15:39:31 +0100 Subject: [PATCH] [EGD-8168] Fix Fixed lock screen in Calendar and Meditation Fixed empty Lock screen in applications Caledar and Meditation. Error was caused by not handled messages response at all. --- module-apps/application-calendar/ApplicationCalendar.cpp | 2 +- .../application-meditation/ApplicationMeditation.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/module-apps/application-calendar/ApplicationCalendar.cpp b/module-apps/application-calendar/ApplicationCalendar.cpp index 2f3f3c1bf99dfd127bf1675acfd6c6ceebf4e1fc..f6a9b6675414d5b43e516791b524e7c00c8b2ff3 100644 --- a/module-apps/application-calendar/ApplicationCalendar.cpp +++ b/module-apps/application-calendar/ApplicationCalendar.cpp @@ -22,7 +22,7 @@ namespace app if (retMsg && (dynamic_cast(retMsg.get())->retCode == sys::ReturnCodes::Success)) { return retMsg; } - return std::make_shared(); + return handleAsyncResponse(resp); } sys::ReturnCodes ApplicationCalendar::InitHandler() diff --git a/module-apps/application-meditation/ApplicationMeditation.cpp b/module-apps/application-meditation/ApplicationMeditation.cpp index 5da4fb9b845d82e00114e7438b5f526721b3ed1c..f05df8f34774106c428beeb53f9d8b3438ded129 100644 --- a/module-apps/application-meditation/ApplicationMeditation.cpp +++ b/module-apps/application-meditation/ApplicationMeditation.cpp @@ -30,7 +30,13 @@ namespace app auto ApplicationMeditation::DataReceivedHandler(sys::DataMessage *msgl, sys::ResponseMessage *resp) -> sys::MessagePointer { - return Application::DataReceivedHandler(msgl); + auto retMsg = Application::DataReceivedHandler(msgl); + // if message was handled by application's template there is no need to process further. + if (retMsg && (dynamic_cast(retMsg.get())->retCode == sys::ReturnCodes::Success)) { + return retMsg; + } + + return handleAsyncResponse(resp); } auto ApplicationMeditation::SwitchPowerModeHandler(sys::ServicePowerMode mode) -> sys::ReturnCodes