Skip to content

Commit

Permalink
Add const to value
Browse files Browse the repository at this point in the history
  • Loading branch information
OHerasym committed Aug 25, 2016
1 parent 7073b13 commit b4e3de2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ void OnButtonEventNotification::Run() {
static_cast<uint32_t>(
(*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<uint32_t>(mobile_apis::ButtonName::CUSTOM_BUTTON) == btn_id) {
Expand Down Expand Up @@ -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()) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ void OnButtonPressNotification::Run() {
static_cast<uint32_t>(
(*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<uint32_t>(mobile_apis::ButtonName::CUSTOM_BUTTON) == btn_id) {
Expand Down Expand Up @@ -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()) &&
Expand Down

0 comments on commit b4e3de2

Please sign in to comment.