diff options
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc')
-rw-r--r-- | src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc index c308af9b92..1500f272ab 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_vr_language_change_notification.cc @@ -60,14 +60,19 @@ OnVRLanguageChangeNotification::~OnVRLanguageChangeNotification() {} void OnVRLanguageChangeNotification::Run() { LOG4CXX_AUTO_TRACE(logger_); - HMICapabilities& hmi_capabilities = hmi_capabilities_; - - hmi_capabilities.set_active_vr_language( + hmi_capabilities_.set_active_vr_language( static_cast<hmi_apis::Common_Language::eType>( (*message_)[strings::msg_params][strings::language].asInt())); + std::vector<std::string> sections_to_update{hmi_response::language}; + if (!hmi_capabilities_.SaveCachedCapabilitiesToFile( + hmi_interface::vr, sections_to_update, message_->getSchema())) { + LOG4CXX_ERROR(logger_, + "Failed to save VR.OnLanguageChange response to cache"); + } + (*message_)[strings::msg_params][strings::hmi_display_language] = - hmi_capabilities.active_ui_language(); + hmi_capabilities_.active_ui_language(); (*message_)[strings::params][strings::function_id] = static_cast<int32_t>(mobile_apis::FunctionID::OnLanguageChangeID); |