summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcollin <collin+i@collinmcqueen.com>2020-07-17 15:06:24 -0400
committercollin <collin+i@collinmcqueen.com>2020-07-17 15:06:24 -0400
commit6a220be1b062d86feba78d63f455ed6ebb63099e (patch)
treede217d8c915644132e0f9ecf54811a746a4b01e0
parentda3b16d83e445025f8f9bcc248b25b9ec046e4de (diff)
downloadsdl_core-6a220be1b062d86feba78d63f455ed6ebb63099e.tar.gz
fixup! allow button events to be forwarded to subscribed mobile apps in hmi level LIMITED for all buttons besides OK
use existing var and clean up condition
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc4
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc3
2 files changed, 2 insertions, 5 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc
index 94c6f304d9..9c4be847a1 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_event_notification.cc
@@ -141,9 +141,7 @@ void OnButtonEventNotification::Run() {
}
// if OK button and "app_id" absent send notification only in HMI_FULL mode
// otherwise send to subscribed apps in limited
- if (is_app_id_exists ||
- (*message_)[strings::msg_params][strings::name].asInt() !=
- hmi_apis::Common_ButtonName::OK ||
+ if (is_app_id_exists || hmi_apis::Common_ButtonName::OK != btn_id ||
subscribed_app->IsFullscreen()) {
SendButtonEvent(subscribed_app);
}
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc
index 9277a112d8..87d16e87e6 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_button_press_notification.cc
@@ -149,8 +149,7 @@ void OnButtonPressNotification::Run() {
if (app->app_id() == subscribed_app->app_id()) {
SendButtonPress(subscribed_app);
}
- } else if ((*message_)[strings::msg_params][strings::name].asInt() !=
- hmi_apis::Common_ButtonName::OK ||
+ } else if (hmi_apis::Common_ButtonName::OK != btn_id ||
subscribed_app->IsFullscreen()) {
// if No "appID" and OK button - send it FULL apps only.
// if not OK button, send to LIMITED subscribed apps