summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc')
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc
index 4c725267fa..59602cf10a 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/vr_get_supported_languages_response.cc
@@ -60,10 +60,20 @@ void VRGetSupportedLanguagesResponse::Run() {
static_cast<hmi_apis::Common_Result::eType>(
(*message_)[strings::params][hmi_response::code].asInt());
+ hmi_capabilities_.UpdateRequestsRequiredForCapabilities(
+ hmi_apis::FunctionID::VR_GetSupportedLanguages);
+
if (hmi_apis::Common_Result::SUCCESS == code) {
HMICapabilities& hmi_capabilities = hmi_capabilities_;
hmi_capabilities.set_vr_supported_languages(
(*message_)[strings::msg_params][hmi_response::languages]);
+
+ std::vector<std::string> sections_to_update{hmi_response::languages};
+ if (!hmi_capabilities_.SaveCachedCapabilitiesToFile(
+ hmi_interface::vr, sections_to_update, message_->getSchema())) {
+ LOG4CXX_ERROR(
+ logger_, "Failed to save VR.GetSupportedLanguages response to cache");
+ }
}
}