Skip to content

Commit

Permalink
fixes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
VadymLuchko committed Jul 9, 2021
1 parent ad1121b commit 2529ff7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ void UnsubscribeButtonRequest::Run() {

void UnsubscribeButtonRequest::onTimeOut() {
SDL_LOG_AUTO_TRACE();
application_manager_.updateRequestTimeout(
connection_key(), correlation_id(), 0);

auto& resume_ctrl = application_manager_.resume_controller();

resume_ctrl.HandleOnTimeOut(
Expand Down Expand Up @@ -133,7 +132,9 @@ void UnsubscribeButtonRequest::on_event(const event_engine::Event& event) {
static_cast<hmi_apis::Common_Result::eType>(
message[strings::params][hmi_response::code].asInt());

if (hmi_apis::Common_Result::SUCCESS == hmi_result && is_pending) {
if ((hmi_apis::Common_Result::SUCCESS == hmi_result ||
hmi_apis::Common_Result::WARNINGS == hmi_result) &&
is_pending) {
const mobile_apis::ButtonName::eType btn_id =
static_cast<mobile_apis::ButtonName::eType>(
(*message_)[strings::msg_params][strings::button_name].asInt());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,6 @@ void UnsubscribeButtonRequest::on_event(const event_engine::Event& event) {
const bool result = PrepareResultForMobileResponse(
hmi_result, HmiInterfaces::HMI_INTERFACE_Buttons);

if (result) {
const mobile_apis::ButtonName::eType btn_id =
static_cast<mobile_apis::ButtonName::eType>(
(*message_)[str::msg_params][str::button_name].asInt());
app->UnsubscribeFromButton(
static_cast<mobile_apis::ButtonName::eType>(btn_id));
}
mobile_apis::Result::eType result_code =
MessageHelper::HMIToMobileResult(hmi_result);

Expand Down

0 comments on commit 2529ff7

Please sign in to comment.