diff options
author | dtrunov <dtrunov@luxoft.com> | 2015-08-19 13:00:14 +0300 |
---|---|---|
committer | dtrunov <dtrunov@luxoft.com> | 2015-12-01 12:49:05 +0200 |
commit | 013a6f8294effd1ba4374cabaa08bbba71127a65 (patch) | |
tree | 6d44a20c9950bd102db4518cab27d3237c215fd6 | |
parent | d6120b98447ff89c1cfab05545709c9e70829347 (diff) | |
download | smartdevicelink-013a6f8294effd1ba4374cabaa08bbba71127a65.tar.gz |
Add checking of SO field.
Add checking of SO field during creation of request to HMI.
If user calls to nonexistent field from SO, SO creates this field with default value.
Closes-bug: APPLINK-13006
-rw-r--r-- | src/components/application_manager/src/message_helper.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/application_manager/src/message_helper.cc b/src/components/application_manager/src/message_helper.cc index ee41ce5bf..a3f8adbc7 100644 --- a/src/components/application_manager/src/message_helper.cc +++ b/src/components/application_manager/src/message_helper.cc @@ -1102,11 +1102,11 @@ smart_objects::SmartObjectList MessageHelper::CreateAddCommandRequestToHMI( msg_params[strings::menu_params] = (*i->second)[strings::menu_params]; msg_params[strings::app_id] = app->app_id(); - if (((*i->second)[strings::cmd_icon].keyExists(strings::value)) + if (((*i->second).keyExists(strings::cmd_icon)) && (0 < (*i->second)[strings::cmd_icon][strings::value].length())) { msg_params[strings::cmd_icon] = (*i->second)[strings::cmd_icon]; msg_params[strings::cmd_icon][strings::value] = - (*i->second)[strings::cmd_icon][strings::value].asString(); + (*i->second)[strings::cmd_icon][strings::value].asString(); } (*ui_command)[strings::msg_params] = msg_params; requests.push_back(ui_command); |