Skip to content

Commit

Permalink
Bugfix SDL forwards OnButtonEvent notification
Browse files Browse the repository at this point in the history
Bugfix `SDL forwards OnButtonEvent notification
of CUSTOM_BUTTON to BACKGROUND App.`
Issue number #967
  • Loading branch information
v-malko4 authored and LitvinenkoIra committed Dec 10, 2019
1 parent e137556 commit e46978d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,10 @@ void OnButtonEventNotification::Run() {
const auto window_id = app->GetSoftButtonWindowID(custom_btn_id);
(*message_)[strings::msg_params][strings::window_id] = window_id;
const auto window_hmi_level = app->hmi_level(window_id);
if ((mobile_api::HMILevel::HMI_FULL != window_hmi_level) &&
(mobile_api::HMILevel::HMI_LIMITED != window_hmi_level)) {
if ((mobile_api::HMILevel::HMI_NONE == window_hmi_level)) {
LOG4CXX_WARN(logger_,
"CUSTOM_BUTTON OnButtonEvent notification is allowed only "
<< "in FULL or LIMITED hmi level");
<< "in FULL, LIMITED or BACKGROUND hmi level");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,10 @@ void OnButtonPressNotification::Run() {
app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
(*message_)[strings::msg_params][strings::window_id] = window_id;
const auto window_hmi_level = app->hmi_level(window_id);
if ((mobile_api::HMILevel::HMI_FULL != window_hmi_level) &&
(mobile_api::HMILevel::HMI_LIMITED != window_hmi_level)) {
if ((mobile_api::HMILevel::HMI_NONE == window_hmi_level)) {
LOG4CXX_WARN(logger_,
"CUSTOM_BUTTON OnButtonPress notification is allowed only "
<< "in FULL or LIMITED hmi level");
<< "in FULL, LIMITED or BACKGROUND hmi level");
return;
}

Expand Down

0 comments on commit e46978d

Please sign in to comment.