summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/commands/mobile/add_command_request.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/src/commands/mobile/add_command_request.cc')
-rw-r--r--src/components/application_manager/src/commands/mobile/add_command_request.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/components/application_manager/src/commands/mobile/add_command_request.cc b/src/components/application_manager/src/commands/mobile/add_command_request.cc
index a76f537a24..69948b8122 100644
--- a/src/components/application_manager/src/commands/mobile/add_command_request.cc
+++ b/src/components/application_manager/src/commands/mobile/add_command_request.cc
@@ -64,6 +64,11 @@ void AddCommandRequest::onTimeOut() {
CommandRequestImpl::onTimeOut();
}
+bool AddCommandRequest::Init() {
+ hash_update_mode_ = HashUpdateMode::kDoHashUpdate;
+ return true;
+}
+
void AddCommandRequest::Run() {
LOG4CXX_AUTO_TRACE(logger_);
@@ -187,10 +192,12 @@ void AddCommandRequest::Run() {
}
if (send_ui_) {
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
SendHMIRequest(hmi_apis::FunctionID::UI_AddCommand, &ui_msg_params, true);
}
if (send_vr_) {
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
SendHMIRequest(hmi_apis::FunctionID::VR_AddCommand, &vr_msg_params, true);
}
}
@@ -312,6 +319,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
switch (event.id()) {
case hmi_apis::FunctionID::UI_AddCommand: {
LOG4CXX_INFO(logger_, "Received UI_AddCommand event");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_UI);
is_ui_received_ = true;
ui_result_ = static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asInt());
@@ -323,6 +331,7 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
}
case hmi_apis::FunctionID::VR_AddCommand: {
LOG4CXX_INFO(logger_, "Received VR_AddCommand event");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_VR);
is_vr_received_ = true;
vr_result_ = static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asInt());
@@ -492,10 +501,6 @@ void AddCommandRequest::on_event(const event_engine::Event& event) {
result_code,
info.empty() ? NULL : info.c_str(),
&(message[strings::msg_params]));
-
- if (result) {
- application->UpdateHash();
- }
}
bool AddCommandRequest::IsPendingResponseExist() {