summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc
diff options
context:
space:
mode:
authorAndrey Oleynik <AOleynik@luxoft.com>2015-08-04 15:43:59 +0300
committerAndrey Oleynik <aoleynik@luxoft.com>2015-08-14 10:36:50 +0300
commit7cba1c57a9966cd8b6215439ff83ba5036a633ca (patch)
tree17c48408a3e13f437bf06b66eead619f312378b2 /src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc
parent05a6d0e42f01f3ddafc8d257ec660168e623a6ff (diff)
downloadsdl_core-7cba1c57a9966cd8b6215439ff83ba5036a633ca.tar.gz
Implements new handling of WARNING code from HMI. Part 1.
In case of HMI sends WARNING as result code SDL must transfer it to mobile side with 'success:true' Implements: APPLINK-15040 Conflicts: src/components/application_manager/src/commands/mobile/create_interaction_choice_set_request.cc src/components/application_manager/src/commands/mobile/register_app_interface_request.cc
Diffstat (limited to 'src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc')
-rw-r--r--src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc b/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc
index 0ce2046b46..b10e3f44d6 100644
--- a/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc
+++ b/src/components/application_manager/src/commands/mobile/unsubscribe_vehicle_data_request.cc
@@ -229,6 +229,11 @@ void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
const smart_objects::SmartObject& message = event.smart_object();
+ if (hmi_apis::FunctionID::VehicleInfo_UnsubscribeVehicleData != event.id()) {
+ LOG4CXX_ERROR(logger_, "Received unknown event.");
+ return;
+ }
+
#ifdef HMI_DBUS_API
for (HmiRequests::iterator it = hmi_requests_.begin();
it != hmi_requests_.end(); ++it) {
@@ -288,13 +293,11 @@ void UnsubscribeVehicleDataRequest::on_event(const event_engine::Event& event) {
message[strings::params][hmi_response::code].asInt());
bool is_succeeded =
- hmi_result == hmi_apis::Common_Result::SUCCESS;
+ hmi_apis::Common_Result::SUCCESS == hmi_result ||
+ hmi_apis::Common_Result::WARNINGS == hmi_result;
mobile_apis::Result::eType result_code =
- hmi_result == hmi_apis::Common_Result::SUCCESS
- ? mobile_apis::Result::SUCCESS
- : static_cast<mobile_apis::Result::eType>(
- message[strings::params][hmi_response::code].asInt());
+ static_cast<mobile_apis::Result::eType>(hmi_result);
const char* return_info = NULL;