From 8e8bc48e973237d8fcf04d75e177af2494f4a7fe Mon Sep 17 00:00:00 2001 From: Dmitriy Klimenko Date: Thu, 20 Mar 2014 07:51:41 -0700 Subject: [PATCH] APPLINK-6319: Request without SoftButtons returns INVALID_DATA --- .../commands/mobile/show_constant_tbt_request.cc | 35 ++++++++++------------ 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc b/src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc index 27cb9f5..3c7dd8f 100644 --- a/src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc +++ b/src/components/application_manager/src/commands/mobile/show_constant_tbt_request.cc @@ -66,25 +66,20 @@ void ShowConstantTBTRequest::Run() { smart_objects::SmartType_Map); msg_params = (*message_)[strings::msg_params]; - // TODO(DK): Missing mandatory param - if (!msg_params.keyExists(strings::soft_buttons)) { - SendResponse(false, mobile_apis::Result::INVALID_DATA); - LOG4CXX_ERROR(logger_, "INVALID_DATA"); - return; - } - - mobile_apis::Result::eType processing_result = - MessageHelper::ProcessSoftButtons(msg_params, app); - - if (mobile_apis::Result::SUCCESS != processing_result) { - if (mobile_apis::Result::INVALID_DATA == processing_result) { - LOG4CXX_ERROR(logger_, "INVALID_DATA!"); - SendResponse(false, processing_result); - return; - } - if (mobile_apis::Result::UNSUPPORTED_RESOURCE == processing_result) { - LOG4CXX_ERROR(logger_, "UNSUPPORTED_RESOURCE!"); - result_ = processing_result; + if (msg_params.keyExists(strings::soft_buttons)) { + mobile_apis::Result::eType processing_result = + MessageHelper::ProcessSoftButtons(msg_params, app); + + if (mobile_apis::Result::SUCCESS != processing_result) { + if (mobile_apis::Result::INVALID_DATA == processing_result) { + LOG4CXX_ERROR(logger_, "INVALID_DATA!"); + SendResponse(false, processing_result); + return; + } + if (mobile_apis::Result::UNSUPPORTED_RESOURCE == processing_result) { + LOG4CXX_ERROR(logger_, "UNSUPPORTED_RESOURCE!"); + result_ = processing_result; + } } } @@ -156,7 +151,7 @@ void ShowConstantTBTRequest::Run() { app->set_tbt_show_command(msg_params); SendHMIRequest(hmi_apis::FunctionID::Navigation_ShowConstantTBT, &msg_params, - true); + true); } -- 2.7.4