summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc')
-rw-r--r--src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc b/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc
index 5a922f595f..f67d1f2434 100644
--- a/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc
+++ b/src/components/application_manager/src/commands/mobile/end_audio_pass_thru_request.cc
@@ -32,6 +32,7 @@
*/
#include "application_manager/commands/mobile/end_audio_pass_thru_request.h"
+#include "application_manager/message_helper.h"
namespace application_manager {
@@ -55,12 +56,13 @@ void EndAudioPassThruRequest::on_event(const event_engine::Event& event) {
switch (event.id()) {
case hmi_apis::FunctionID::UI_EndAudioPassThru: {
- mobile_apis::Result::eType mobile_code =
- GetMobileResultCode(static_cast<hmi_apis::Common_Result::eType>(
- message[strings::params][hmi_response::code].asUInt()));
-
- bool result = mobile_apis::Result::SUCCESS == mobile_code;
-
+ hmi_apis::Common_Result::eType result_code =
+ static_cast<hmi_apis::Common_Result::eType>(
+ message[strings::params][hmi_response::code].asUInt());
+ std::string response_info;
+ GetInfo(message, response_info);
+ const bool result = PrepareResultForMobileResponse(
+ result_code, HmiInterfaces::HMI_INTERFACE_UI);
if (result) {
bool ended_successfully = application_manager_.EndAudioPassThrough();
if (ended_successfully) {
@@ -68,7 +70,10 @@ void EndAudioPassThruRequest::on_event(const event_engine::Event& event) {
}
}
- SendResponse(result, mobile_code, NULL, &(message[strings::msg_params]));
+ SendResponse(result,
+ MessageHelper::HMIToMobileResult(result_code),
+ response_info.empty() ? NULL : response_info.c_str(),
+ &(message[strings::msg_params]));
break;
}
default: {