From 353f0970420eff51d20886d43f4d18888dc3707c Mon Sep 17 00:00:00 2001 From: Hrytsevich Anton Date: Thu, 6 Oct 2016 12:58:58 +0300 Subject: Fix incorrect behaviour of response for PerfomInte Fixed incorrect behaviour for PerfomInteraction request in case: 1) when VR is not responded and UI respond success 2) when VR responds UNSUPPORTED_RESOURCE and UI/TTS responds one of success codes 3) when VR responds UNSUPPORTED_RESOURCE and UI responds one of unsuccess codes. Closes-bug: [APPLINK-27576](https://adc.luxoft.com/jira/browse/APPLINK-27576) Closes-bug: [APPLINK-27580](https://adc.luxoft.com/jira/browse/APPLINK-27580) Closes-bug: [APPLINK-27598](https://adc.luxoft.com/jira/browse/APPLINK-27598) --- .../commands/mobile/perform_interaction_request.cc | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc b/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc index 37987e5f5b..3fd6cf4579 100644 --- a/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc +++ b/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc @@ -267,6 +267,7 @@ void PerformInteractionRequest::onTimeOut() { switch (interaction_mode_) { case mobile_apis::InteractionMode::BOTH: { + LOG4CXX_DEBUG(logger_, "Interaction Mode: BOTH"); if (true == vr_response_recived_) { unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction); DisablePerformInteraction(); @@ -278,11 +279,14 @@ void PerformInteractionRequest::onTimeOut() { break; } case mobile_apis::InteractionMode::VR_ONLY: { - application_manager_.updateRequestTimeout( - connection_key(), correlation_id(), default_timeout()); + LOG4CXX_DEBUG(logger_, "Interaction Mode: VR_ONLY"); + unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction); + DisablePerformInteraction(); + CommandRequestImpl::onTimeOut(); break; } case mobile_apis::InteractionMode::MANUAL_ONLY: { + LOG4CXX_DEBUG(logger_, "InteractionMode: MANUAL_ONLY"); unsubscribe_from_event(hmi_apis::FunctionID::UI_PerformInteraction); DisablePerformInteraction(); CommandRequestImpl::onTimeOut(); @@ -420,17 +424,6 @@ bool PerformInteractionRequest::ProcessUIResponse( } } } - - const SmartObject* response_params = msg_params.empty() ? NULL : &msg_params; - if (mobile_apis::InteractionMode::BOTH != interaction_mode_ && - HmiInterfaces::STATE_NOT_AVAILABLE != ui_interface_state) { - DisablePerformInteraction(); - SendResponse(result, - MessageHelper::HMIToMobileResult(ui_result_code_), - ui_info_.empty() ? NULL : ui_info_.c_str(), - response_params); - return true; - } return false; } -- cgit v1.2.1