summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc')
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc
index 8f8e4dbf6f..2f3d38f0b0 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/perform_audio_pass_thru_request.cc
@@ -87,7 +87,8 @@ void PerformAudioPassThruRequest::Run() {
return;
}
- if (mobile_api::HMILevel::HMI_NONE == app->hmi_level()) {
+ if (mobile_api::HMILevel::HMI_NONE ==
+ app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW)) {
LOG4CXX_ERROR(logger_, "application isn't activated");
SendResponse(false, mobile_apis::Result::REJECTED);
return;
@@ -286,20 +287,22 @@ void PerformAudioPassThruRequest::SendPerformAudioPassThruRequest() {
msg_params[hmi_request::audio_pass_display_texts] =
smart_objects::SmartObject(smart_objects::SmartType_Array);
+ int32_t index = 0;
if ((*message_)[str::msg_params].keyExists(str::audio_pass_display_text1)) {
- msg_params[hmi_request::audio_pass_display_texts][0]
+ msg_params[hmi_request::audio_pass_display_texts][index]
[hmi_request::field_name] = static_cast<int32_t>(
hmi_apis::Common_TextFieldName::audioPassThruDisplayText1);
- msg_params[hmi_request::audio_pass_display_texts][0]
+ msg_params[hmi_request::audio_pass_display_texts][index]
[hmi_request::field_text] =
(*message_)[str::msg_params][str::audio_pass_display_text1];
+ ++index;
}
if ((*message_)[str::msg_params].keyExists(str::audio_pass_display_text2)) {
- msg_params[hmi_request::audio_pass_display_texts][1]
+ msg_params[hmi_request::audio_pass_display_texts][index]
[hmi_request::field_name] = static_cast<int32_t>(
hmi_apis::Common_TextFieldName::audioPassThruDisplayText2);
- msg_params[hmi_request::audio_pass_display_texts][1]
+ msg_params[hmi_request::audio_pass_display_texts][index]
[hmi_request::field_text] =
(*message_)[str::msg_params][str::audio_pass_display_text2];
}