From f2eace68e6b974f587f329201f5f1d9414462f74 Mon Sep 17 00:00:00 2001 From: "Pawel.Paprocki" Date: Wed, 17 Feb 2021 14:58:38 +0100 Subject: [PATCH] [EGD-5795] Fix Some MMI data responses are showing only title Fix message processing for call waiting data response Fix message processing for call barring data response --- image/assets/lang/English.json | 14 +++++++------- module-apps/application-desktop/data/Mmi.hpp | 20 +++++++++++++------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/image/assets/lang/English.json b/image/assets/lang/English.json index 980e3db198d982f9353e97b6577412df31cba897..25e7730f05817b3b121e31637c7000fb4f977c8c 100644 --- a/image/assets/lang/English.json +++ b/image/assets/lang/English.json @@ -186,9 +186,9 @@ "app_desktop_info_mmi_common_fax": "FAX", "app_desktop_info_mmi_common_sync": "sync", "app_desktop_info_mmi_common_async": "async", - "app_desktop_info_mmi_common_all_disabled": "all disabled", - "app_desktop_info_mmi_common_deactivated": "deactivated", - "app_desktop_info_mmi_common_activated": "activated", + "app_desktop_info_mmi_common_all_disabled": "all bearer services disabled", + "app_desktop_info_mmi_common_deactivated": "service was deactivated", + "app_desktop_info_mmi_common_activated": "service was activated", "app_desktop_info_mmi_common_query": "query", "app_desktop_info_mmi_clir_according_to_subscription": "CLIR according to subscription", "app_desktop_info_mmi_clir_enabled": "CLIR enabled", @@ -207,15 +207,15 @@ "app_desktop_info_mmi_enabling_failed": "Service enabling failed", "app_desktop_info_mmi_enabling_success": "Service has been enabled", "app_desktop_info_mmi_call_forwarding_disabled": "call forwarding disabled", - "app_desktop_info_mmi_call_barring_activated": "call barring activated", - "app_desktop_info_mmi_call_barring_deactivated": "call barring deactivated", + "app_desktop_info_mmi_call_barring_activated": "Call barring was activated", + "app_desktop_info_mmi_call_barring_deactivated": "Call barring was deactivated", "app_desktop_info_mmi_clip_activated": "CLIP activated", "app_desktop_info_mmi_clip_deactivated": "CLIP deactivated", "app_desktop_info_mmi_clip_not_provisioned": "CLIP not provisioned", "app_desktop_info_mmi_clip_provisioned": "CLIP provisioned", "app_desktop_info_mmi_clip_unknown": "CLIP unknown", - "app_desktop_info_mmi_call_waiting_activated": " call waiting activated", - "app_desktop_info_mmi_call_waiting_deactivated": "call waiting deactivated", + "app_desktop_info_mmi_call_waiting_activated": "Call waiting was activated", + "app_desktop_info_mmi_call_waiting_deactivated": "Call waiting was deactivated", "app_desktop_info_mmi_call_forwarding": "Call forwarding", "app_desktop_info_mmi_call_barring": "Call barring", "app_desktop_info_mmi_call_waiting": "Call waiting", diff --git a/module-apps/application-desktop/data/Mmi.hpp b/module-apps/application-desktop/data/Mmi.hpp index 45782f564bfd66f23c34400292b33282351ee907..65050ab948f58f2346f4e155a405bf20bc84b2c2 100644 --- a/module-apps/application-desktop/data/Mmi.hpp +++ b/module-apps/application-desktop/data/Mmi.hpp @@ -140,7 +140,7 @@ namespace mmi { displayMessage += utils::localize.get("app_desktop_info_mmi_call_barring") + "\n"; if (customResult.getMessageType() == mmiactions::IMMICustomResultParams::MMIType::CallBarringData) { - displayMessage += getQueryResult(customResult.getMessages()); + displayMessage += getCustomMessagesFromDictionary(customResult.getMessages()); } else if (customResult.getMessageType() == mmiactions::IMMICustomResultParams::MMIType::CallBarringNotification) { @@ -152,7 +152,7 @@ namespace mmi { displayMessage += utils::localize.get("app_desktop_info_mmi_call_waiting") + "\n"; if (customResult.getMessageType() == mmiactions::IMMICustomResultParams::MMIType::CallWaitingData) { - displayMessage += getQueryResult(customResult.getMessages()); + displayMessage += getCustomMessagesFromDictionary(customResult.getMessages()); } else if (customResult.getMessageType() == mmiactions::IMMICustomResultParams::MMIType::CallWaitingNotification) { @@ -179,19 +179,25 @@ namespace mmi displayMessage += getSelectedMessagesFromDictionary(customResult.getMessage()); } - std::string getQueryResult(std::vector> msgData) + std::string getCustomMessagesFromDictionary( + std::vector> msgData) { std::string queryStr; for (auto msg : msgData) { auto serviceClass = msg.first; auto serviceState = msg.second; - if (serviceState == mmiactions::IMMICustomResultParams::MMIResultMessage::CommonQuery) { - auto it = messageDictionary.find(serviceClass); - if (messageDictionary.end() != it) { + + auto it = messageDictionary.find(serviceState); + if (messageDictionary.end() != it) { + if (queryStr.empty()) { queryStr += utils::localize.get(it->second) + "\n"; } } + it = messageDictionary.find(serviceClass); + if (messageDictionary.end() != it) { + queryStr += utils::localize.get(it->second) + "\n"; + } } return queryStr; }