diff options
author | Maksym Ked (GitHub) <mked@luxoft.com> | 2018-09-05 16:54:51 +0300 |
---|---|---|
committer | Andriy Byzhynar <abyzhynar@luxoft.com> | 2018-09-17 16:53:28 +0300 |
commit | 57ba790b19d6ff211b6eff3f9c714e2686952121 (patch) | |
tree | cd94ad1dec2c9cca0b86a313c299163a8160657f | |
parent | ff636c4848082381ae1ea1878dab08875f505374 (diff) | |
download | sdl_core-57ba790b19d6ff211b6eff3f9c714e2686952121.tar.gz |
fixed warnings processing
2 files changed, 13 insertions, 1 deletions
diff --git a/src/components/application_manager/include/application_manager/resumption/resumption_data_processor.h b/src/components/application_manager/include/application_manager/resumption/resumption_data_processor.h index affabb7cd9..918988a47e 100644 --- a/src/components/application_manager/include/application_manager/resumption/resumption_data_processor.h +++ b/src/components/application_manager/include/application_manager/resumption/resumption_data_processor.h @@ -279,6 +279,13 @@ class ResumptionDataProcessor : public app_mngr::event_engine::EventObserver { app_mngr::ApplicationSharedPtr application) const; /** + * @brief Determines whether request is successful + * judging from result code received from HMI + * @param result_code received from HMI + */ + bool IsRequestSuccessful(const hmi_apis::Common_Result::eType result_code) const; + + /** * @brief A map of the IDs and Application Resumption Status for these ID **/ app_mngr::ApplicationManager& application_manager_; diff --git a/src/components/application_manager/src/resumption/resumption_data_processor.cc b/src/components/application_manager/src/resumption/resumption_data_processor.cc index cb37c78c25..1180ee0ad2 100644 --- a/src/components/application_manager/src/resumption/resumption_data_processor.cc +++ b/src/components/application_manager/src/resumption/resumption_data_processor.cc @@ -141,7 +141,7 @@ void ResumptionDataProcessor::on_event(const event_engine::Event& event) { response[strings::params][application_manager::hmi_response::code] .asInt()); - if (result_code == hmi_apis::Common_Result::SUCCESS) { + if (IsRequestSuccessful(result_code)) { status.successful_requests.push_back(*request_ptr); } else { status.error_requests.push_back(*request_ptr); @@ -656,4 +656,9 @@ void ResumptionDataProcessor::DeletePluginsSubscriptions( } } +bool ResumptionDataProcessor::IsRequestSuccessful(const hmi_apis::Common_Result::eType result_code) const { + return result_code == hmi_apis::Common_Result::SUCCESS || + result_code == hmi_apis::Common_Result::WARNINGS; +} + } // namespce resumption |