summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/commands/mobile/on_button_event_notification.cc
diff options
context:
space:
mode:
authorVeronica Veremjova <vveremjova@luxoft.com>2016-12-28 18:00:50 +0200
committerVeronica Veremjova <vveremjova@luxoft.com>2016-12-30 10:16:15 +0200
commit1e7f91bed9085e7e92cd3ca04b39ed11d68b585f (patch)
tree77f9fcd8c3b9f5984d04d9786e4ac43c52f5e166 /src/components/application_manager/src/commands/mobile/on_button_event_notification.cc
parent4ff12fe67f0ed15700fd030690276712ef23659d (diff)
downloadsdl_core-1e7f91bed9085e7e92cd3ca04b39ed11d68b585f.tar.gz
Fix sending Custom_button when app in background
If app is not in FULL or Limited then onButtonEvent should not be sent Related to APPLINK-21977
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.cc8
1 files changed, 8 insertions, 0 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 82836717a3..7c631d6d4b 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
@@ -94,6 +94,14 @@ void OnButtonEventNotification::Run() {
return;
}
+ if ((mobile_api::HMILevel::HMI_FULL != app->hmi_level()) &&
+ (mobile_api::HMILevel::HMI_LIMITED != app->hmi_level())) {
+ LOG4CXX_WARN(logger_,
+ "CUSTOM_BUTTON OnButtonEvent notification is allowed only "
+ << "in FULL or LIMITED hmi level");
+ return;
+ }
+
SendButtonEvent(app);
return;
}