summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kutsan (GitHub) <akutsan@luxoft.com>2016-10-12 17:22:35 +0300
committerGitHub <noreply@github.com>2016-10-12 17:22:35 +0300
commit18c9e8af5fe31dc7d8e07102986370decaa5944f (patch)
treedb254560ce8add1581f47d7a561b16f7ea4a0fe4
parentdb5af6c8d99159b5d2b427557ac4ef4cb67143b8 (diff)
parent527c3d63896e82008582bfabf45f40150d930465 (diff)
downloadsdl_core-18c9e8af5fe31dc7d8e07102986370decaa5944f.tar.gz
Merge pull request #893 from LuxoftAKutsan/fix/send_language_if_tts_available
Send language param in RAI response if TTS is available
-rw-r--r--src/components/application_manager/src/commands/mobile/register_app_interface_request.cc11
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);
}