diff options
Diffstat (limited to 'src/components/application_manager/src/commands/mobile/on_button_event_notification.cc')
-rw-r--r-- | src/components/application_manager/src/commands/mobile/on_button_event_notification.cc | 15 |
1 files changed, 8 insertions, 7 deletions
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 55b9b8818..54575080c 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 @@ -51,7 +51,7 @@ OnButtonEventNotification::~OnButtonEventNotification() { } void OnButtonEventNotification::Run() { - LOG4CXX_INFO(logger_, "OnButtonEventNotification::Run"); + LOG4CXX_AUTO_TRACE(logger_); const uint32_t btn_id = static_cast<uint32_t>( @@ -115,7 +115,7 @@ void OnButtonEventNotification::Run() { //Send ButtonEvent notification for OK button only in HMI_FULL mode if ((static_cast<uint32_t>(mobile_apis::ButtonName::OK) == btn_id) && - (mobile_api::HMILevel::HMI_FULL != subscribed_app->hmi_level())) { + (subscribed_app->IsFullscreen())) { continue; } @@ -124,18 +124,19 @@ void OnButtonEventNotification::Run() { } void OnButtonEventNotification::SendButtonEvent(ApplicationConstSharedPtr app) { - smart_objects::SmartObject* on_btn_event = new smart_objects::SmartObject(); - - if (!on_btn_event) { + if (!app) { LOG4CXX_ERROR_EXT(logger_, "OnButtonEvent NULL pointer"); return; } - if (!app) { + smart_objects::SmartObjectSPtr on_btn_event = new smart_objects::SmartObject(); + + if (!on_btn_event) { LOG4CXX_ERROR_EXT(logger_, "OnButtonEvent NULL pointer"); return; } + (*on_btn_event)[strings::params][strings::connection_key] = app->app_id(); (*on_btn_event)[strings::params][strings::function_id] = @@ -152,7 +153,7 @@ void OnButtonEventNotification::SendButtonEvent(ApplicationConstSharedPtr app) { (*message_)[strings::msg_params][strings::custom_button_id]; } - message_.reset(on_btn_event); + message_ = on_btn_event; SendNotification(); } |