diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/application_manager/src/application_manager_impl.cc | 12 | ||||
-rw-r--r-- | src/components/application_manager/src/message_helper/message_helper.cc | 11 |
2 files changed, 14 insertions, 9 deletions
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc index ec37e3b51f..5066c6dfc6 100644 --- a/src/components/application_manager/src/application_manager_impl.cc +++ b/src/components/application_manager/src/application_manager_impl.cc @@ -3984,11 +3984,19 @@ bool ApplicationManagerImpl::ResetVrHelpTitleItems( const std::string& vr_help_title = get_settings().vr_help_title(); smart_objects::SmartObject so_vr_help_title(vr_help_title); - app->reset_vr_help_title(); - app->reset_vr_help(); app->set_vr_help_title(so_vr_help_title); + app->reset_vr_help(); + smart_objects::SmartObjectSPtr so_vr_help = + MessageHelper::CreateAppVrHelp(app); + if (!so_vr_help->keyExists(strings::vr_help)) { + SDL_LOG_WARN("Failed to create vr_help items. Resetting to empty array"); + (*so_vr_help)[strings::vr_help] = + smart_objects::SmartObject(smart_objects::SmartType_Array); + } + app->set_vr_help((*so_vr_help)[strings::vr_help]); + return true; } diff --git a/src/components/application_manager/src/message_helper/message_helper.cc b/src/components/application_manager/src/message_helper/message_helper.cc index 2e60bb2c66..f8960a26fc 100644 --- a/src/components/application_manager/src/message_helper/message_helper.cc +++ b/src/components/application_manager/src/message_helper/message_helper.cc @@ -383,13 +383,10 @@ MessageHelper::CreateUIResetGlobalPropertiesRequest( smart_objects::SmartType_Map); if (reset_result.vr_help_title_items) { - smart_objects::SmartObjectSPtr vr_help = CreateAppVrHelp(application); - if (!vr_help.get()) { - SDL_LOG_WARN("Failed to create vr_help"); - return smart_objects::SmartObjectSPtr(); - } else { - ui_reset_global_prop_request = vr_help; - } + (*ui_reset_global_prop_request)[strings::vr_help_title] = + *(application->vr_help_title()); + (*ui_reset_global_prop_request)[strings::vr_help] = + *(application->vr_help()); } if (reset_result.menu_name) { (*ui_reset_global_prop_request)[hmi_request::menu_title] = ""; |