summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc')
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc b/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc
index 953bbc7a12..dc3404c022 100644
--- a/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc
+++ b/src/components/application_manager/src/commands/mobile/unsubscribe_way_points_request.cc
@@ -25,11 +25,12 @@ void UnSubscribeWayPointsRequest::Run() {
return;
}
- if (!application_manager_.IsAppSubscribedForWayPoints(app->app_id())) {
+ if (!application_manager_.IsAppSubscribedForWayPoints(app)) {
SendResponse(false, mobile_apis::Result::IGNORED);
return;
}
+ StartAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
SendHMIRequest(
hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints, NULL, true);
}
@@ -41,6 +42,7 @@ void UnSubscribeWayPointsRequest::on_event(const event_engine::Event& event) {
switch (event.id()) {
case hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints: {
LOG4CXX_INFO(logger_, "Received Navigation_UnSubscribeWayPoints event");
+ EndAwaitForInterface(HmiInterfaces::HMI_INTERFACE_Navigation);
const hmi_apis::Common_Result::eType result_code =
static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asInt());
@@ -49,7 +51,7 @@ void UnSubscribeWayPointsRequest::on_event(const event_engine::Event& event) {
const bool result = PrepareResultForMobileResponse(
result_code, HmiInterfaces::HMI_INTERFACE_Navigation);
if (result) {
- application_manager_.UnsubscribeAppFromWayPoints(app->app_id());
+ application_manager_.UnsubscribeAppFromWayPoints(app);
}
SendResponse(result,
MessageHelper::HMIToMobileResult(result_code),