diff options
author | Collin <iCollin@users.noreply.github.com> | 2020-07-23 14:09:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-23 14:09:33 -0400 |
commit | f2119f4b997b7ef8d3d8f771412e1e743c221713 (patch) | |
tree | 069a09f764293f819b3eb7beb284f38757284ee4 /src | |
parent | 5e2dff6d31554d5bd4534ec7f7702dc2f877340e (diff) | |
download | sdl_core-f2119f4b997b7ef8d3d8f771412e1e743c221713.tar.gz |
allow button events to be forwarded to apps in LIMITED (#3461)
* allow button events to be forwarded to subscribed mobile apps in hmi level LIMITED for all buttons besides OK
* 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
* fix description of OnButtonPress and OnButtonEvent param appID
Diffstat (limited to 'src')
3 files changed, 10 insertions, 8 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 bca3b20fe0..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 @@ -139,8 +139,10 @@ void OnButtonEventNotification::Run() { << "in FULL or LIMITED hmi level"); continue; } - // if "app_id" absent send notification only in HMI_FULL mode - if (is_app_id_exists || subscribed_app->IsFullscreen()) { + // 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 || 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 a205660e23..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,10 @@ void OnButtonPressNotification::Run() { if (app->app_id() == subscribed_app->app_id()) { SendButtonPress(subscribed_app); } - } else if (subscribed_app->IsFullscreen()) { - // if No "appID" - send it FULL apps only. + } 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 SendButtonPress(subscribed_app); } } diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml index 0b189c4bca..b40076e9d0 100644 --- a/src/components/interfaces/HMI_API.xml +++ b/src/components/interfaces/HMI_API.xml @@ -4204,10 +4204,9 @@ </param> <param name="appID" type="Integer" mandatory="false"> <description> - In case the ButtonName is CUSTOM_BUTTON or OK, HMI must include appID parameters to OnButtonPress notification sent to SDL. If appID is not sent together with CUSTOM_BUTTON, this notification will be ignored by SDL. If appID is present for OK button -> SDL transfers notification to the named app only if it is in FULL or LIMITED (ignores if app is in NONE or BACKGROUND). - If appID is omited for OK button -> SDL transfers notification to app in FULL + If appID is omitted for OK button -> SDL transfers notification to app in FULL </description> </param> </function> @@ -4221,10 +4220,9 @@ </param> <param name="appID" type="Integer" mandatory="false"> <description> - In case the ButtonName is CUSTOM_BUTTON or OK, HMI must include appID parameters to OnButtonEvent notification sent to SDL. If appID is not sent together with CUSTOM_BUTTON, this notification will be ignored by SDL. If appID is present for OK button -> SDL transfers notification to the named app only if it is in FULL or LIMITED (ignores if app is in NONE or BACKGROUND). - If appID is omited for OK button -> SDL transfers notification to app in FULL + If appID is omitted for OK button -> SDL transfers notification to app in FULL </description> </param> </function> |