summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/commands/mobile/on_button_press_notification.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/src/commands/mobile/on_button_press_notification.cc')
-rw-r--r--src/components/application_manager/src/commands/mobile/on_button_press_notification.cc33
1 files changed, 16 insertions, 17 deletions
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 d4b7daf185..38792d970b 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
@@ -32,7 +32,6 @@
*/
#include "application_manager/commands/mobile/on_button_press_notification.h"
-
#include "application_manager/application_impl.h"
#include "interfaces/MOBILE_API.h"
@@ -49,7 +48,7 @@ OnButtonPressNotification::OnButtonPressNotification(
OnButtonPressNotification::~OnButtonPressNotification() {}
void OnButtonPressNotification::Run() {
- LOG4CXX_AUTO_TRACE(logger_);
+ LOGGER_AUTO_TRACE(logger_);
const uint32_t btn_id = static_cast<uint32_t>(
(*message_)[strings::msg_params][hmi_response::button_name].asInt());
@@ -58,7 +57,7 @@ void OnButtonPressNotification::Run() {
if (static_cast<uint32_t>(mobile_apis::ButtonName::CUSTOM_BUTTON) == btn_id) {
// app_id is mandatory for CUSTOM_BUTTON notification
if (false == (*message_)[strings::msg_params].keyExists(strings::app_id)) {
- LOG4CXX_ERROR(logger_, "CUSTOM_BUTTON OnButtonPress without app_id.");
+ LOGGER_ERROR(logger_, "CUSTOM_BUTTON OnButtonPress without app_id.");
return;
}
@@ -66,8 +65,8 @@ void OnButtonPressNotification::Run() {
if (false ==
(*message_)[strings::msg_params].keyExists(
hmi_response::custom_button_id)) {
- LOG4CXX_ERROR(logger_,
- "CUSTOM_BUTTON OnButtonPress without custom_button_id.");
+ LOGGER_ERROR(logger_,
+ "CUSTOM_BUTTON OnButtonPress without custom_button_id.");
return;
}
@@ -75,7 +74,7 @@ void OnButtonPressNotification::Run() {
(*message_)[strings::msg_params][strings::app_id].asUInt());
if (false == app.valid()) {
- LOG4CXX_ERROR(logger_, "Application doesn't exist.");
+ LOGGER_ERROR(logger_, "Application doesn't exist.");
return;
}
@@ -85,8 +84,8 @@ void OnButtonPressNotification::Run() {
.asUInt();
if (false == app->IsSubscribedToSoftButton(custom_btn_id)) {
- LOG4CXX_ERROR(logger_,
- "Application doesn't subscribed to this custom_button_id.");
+ LOGGER_ERROR(logger_,
+ "Application doesn't subscribed to this custom_button_id.");
return;
}
@@ -101,25 +100,25 @@ void OnButtonPressNotification::Run() {
for (; subscribedApps.end() != it; ++it) {
ApplicationSharedPtr subscribed_app = *it;
if (!subscribed_app) {
- LOG4CXX_WARN(logger_, "Null pointer to subscribed app.");
+ LOGGER_WARN(logger_, "Null pointer to subscribed app.");
continue;
}
// Send ButtonPress notification only in HMI_FULL or HMI_LIMITED mode
if ((mobile_api::HMILevel::HMI_FULL != subscribed_app->hmi_level()) &&
(mobile_api::HMILevel::HMI_LIMITED != subscribed_app->hmi_level())) {
- LOG4CXX_WARN(logger_,
- "OnButtonPress notification is allowed only"
- << "in FULL or LIMITED hmi level");
+ LOGGER_WARN(logger_,
+ "OnButtonPress notification is allowed only"
+ << "in FULL or LIMITED hmi level");
continue;
}
// Send ButtonPress 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())) {
- LOG4CXX_WARN(logger_,
- "OnButtonPress notification for OK button"
- << "is allowed only in FULL hmi level");
+ LOGGER_WARN(logger_,
+ "OnButtonPress notification for OK button"
+ << "is allowed only in FULL hmi level");
continue;
}
@@ -129,7 +128,7 @@ void OnButtonPressNotification::Run() {
void OnButtonPressNotification::SendButtonPress(ApplicationConstSharedPtr app) {
if (!app) {
- LOG4CXX_ERROR(logger_, "OnButtonPress NULL pointer");
+ LOGGER_ERROR(logger_, "OnButtonPress NULL pointer");
return;
}
@@ -137,7 +136,7 @@ void OnButtonPressNotification::SendButtonPress(ApplicationConstSharedPtr app) {
new smart_objects::SmartObject();
if (!on_btn_press) {
- LOG4CXX_ERROR(logger_, "OnButtonPress NULL pointer");
+ LOGGER_ERROR(logger_, "OnButtonPress NULL pointer");
return;
}