diff --git a/src/components/application_manager/src/commands/mobile/on_button_event_notification.cc b/src/components/application_manager/src/commands/mobile/on_button_event_notification.cc index e2108c3abfd..80343c2a88d 100644 --- a/src/components/application_manager/src/commands/mobile/on_button_event_notification.cc +++ b/src/components/application_manager/src/commands/mobile/on_button_event_notification.cc @@ -57,8 +57,9 @@ void OnButtonEventNotification::Run() { static_cast( (*message_)[strings::msg_params][hmi_response::button_name].asInt()); - ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application( - (*message_)[strings::msg_params][strings::app_id].asUInt()); + const ApplicationSharedPtr app = + ApplicationManagerImpl::instance()->application( + (*message_)[strings::msg_params][strings::app_id].asUInt()); // CUSTOM_BUTTON notification if (static_cast(mobile_apis::ButtonName::CUSTOM_BUTTON) == btn_id) { @@ -106,6 +107,7 @@ void OnButtonEventNotification::Run() { continue; } + // if "app_id" absent send notification only in HMI_FULL mode if (app || subscribed_app->IsFullscreen()) { // Send ButtonEvent notification only in HMI_FULL or HMI_LIMITED mode if ((mobile_api::HMILevel::HMI_FULL != subscribed_app->hmi_level()) && diff --git a/src/components/application_manager/src/commands/mobile/on_button_press_notification.cc b/src/components/application_manager/src/commands/mobile/on_button_press_notification.cc index f3726184155..fd8b2d1f835 100644 --- a/src/components/application_manager/src/commands/mobile/on_button_press_notification.cc +++ b/src/components/application_manager/src/commands/mobile/on_button_press_notification.cc @@ -57,8 +57,9 @@ void OnButtonPressNotification::Run() { static_cast( (*message_)[strings::msg_params][hmi_response::button_name].asInt()); - ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application( - (*message_)[strings::msg_params][strings::app_id].asUInt()); + const ApplicationSharedPtr app = + ApplicationManagerImpl::instance()->application( + (*message_)[strings::msg_params][strings::app_id].asUInt()); // CUSTOM_BUTTON notification if (static_cast(mobile_apis::ButtonName::CUSTOM_BUTTON) == btn_id) { @@ -106,6 +107,7 @@ void OnButtonPressNotification::Run() { continue; } + // if "app_id" absent send notification only in HMI_FULL mode if (app || subscribed_app->IsFullscreen()) { // Send ButtonEvent notification only in HMI_FULL or HMI_LIMITED mode if ((mobile_api::HMILevel::HMI_FULL != subscribed_app->hmi_level()) &&