diff options
author | Alexander Kutsan <AKutsan@luxoft.com> | 2016-10-12 14:13:09 +0300 |
---|---|---|
committer | Alexander Kutsan <AKutsan@luxoft.com> | 2016-10-12 14:13:41 +0300 |
commit | 527c3d63896e82008582bfabf45f40150d930465 (patch) | |
tree | db254560ce8add1581f47d7a561b16f7ea4a0fe4 | |
parent | db5af6c8d99159b5d2b427557ac4ef4cb67143b8 (diff) | |
download | sdl_core-527c3d63896e82008582bfabf45f40150d930465.tar.gz |
Send language param in RAI response if TTS is available
Related issue : APPLINK-28819
-rw-r--r-- | src/components/application_manager/src/commands/mobile/register_app_interface_request.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc b/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc index 34c0863ddf..9c03e3b600 100644 --- a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc +++ b/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc @@ -312,6 +312,11 @@ void RegisterAppInterfaceRequest::Run() { SendRegisterAppInterfaceResponseToMobile(); } +void FillTTSRelatedFields(smart_objects::SmartObject& response_params, + const HMICapabilities& hmi_capabilities) { + response_params[strings::language] = hmi_capabilities.active_tts_language(); +} + void FillVRRelatedFields(smart_objects::SmartObject& response_params, const HMICapabilities& hmi_capabilities) { response_params[strings::language] = hmi_capabilities.active_vr_language(); @@ -458,6 +463,12 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile() { if (HmiInterfaces::STATE_NOT_AVAILABLE != application_manager_.hmi_interfaces().GetInterfaceState( + HmiInterfaces::HMI_INTERFACE_TTS)) { + FillTTSRelatedFields(response_params, hmi_capabilities); + } + + if (HmiInterfaces::STATE_NOT_AVAILABLE != + application_manager_.hmi_interfaces().GetInterfaceState( HmiInterfaces::HMI_INTERFACE_VR)) { FillVRRelatedFields(response_params, hmi_capabilities); } |