~aleteoryx/muditaos

f2eace68e6b974f587f329201f5f1d9414462f74 — Pawel.Paprocki 5 years ago bda18b5
[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
2 files changed, 20 insertions(+), 14 deletions(-)

M image/assets/lang/English.json
M module-apps/application-desktop/data/Mmi.hpp
M image/assets/lang/English.json => image/assets/lang/English.json +7 -7
@@ 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",

M module-apps/application-desktop/data/Mmi.hpp => module-apps/application-desktop/data/Mmi.hpp +13 -7
@@ 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<std::pair<mmiactions::IMMICustomResultParams::MMIResultMessage,
                                                         mmiactions::IMMICustomResultParams::MMIResultMessage>> msgData)
        std::string getCustomMessagesFromDictionary(
            std::vector<std::pair<mmiactions::IMMICustomResultParams::MMIResultMessage,
                                  mmiactions::IMMICustomResultParams::MMIResultMessage>> 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;
        }