diff options
author | Veronica Veremjova (GitHub) <vveremjova@luxoft.com> | 2017-01-13 17:01:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-13 17:01:19 +0200 |
commit | c656bc51132b66f086cf56e590d63431756aa524 (patch) | |
tree | d242df21760629865feb58d80fef20bd24bfbb16 | |
parent | d43cb39d40e5ced1d7719a0bfeb36da3e257b189 (diff) | |
parent | c82008832da0b84fab45dd7d1dfec4b62e3ad9ef (diff) | |
download | sdl_core-c656bc51132b66f086cf56e590d63431756aa524.tar.gz |
Merge pull request #1172 from VVeremjova/fix/Fix_transfering_OnKeyboardInput_notification_to_not_active_App
Fix transferring OnKeyboardInput notification
3 files changed, 6 insertions, 1 deletions
diff --git a/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc b/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc index 851e9f3059..427f52c12b 100644 --- a/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc +++ b/src/components/application_manager/src/commands/mobile/on_keyboard_input_notification.cc @@ -58,7 +58,9 @@ void OnKeyBoardInputNotification::Run() { for (; accessor.GetData().end() != it; ++it) { // if there is app with active perform interaction use it for notification ApplicationSharedPtr app = *it; - if (app->is_perform_interaction_active()) { + if (app->is_perform_interaction_active() && + (*it)->perform_interaction_layout() == + mobile_apis::LayoutMode::KEYBOARD) { LOG4CXX_INFO(logger_, "There is application with active PerformInteraction"); app_to_notify = app; diff --git a/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc b/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc index d094c3d80e..007440e8e6 100644 --- a/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc +++ b/src/components/application_manager/src/commands/mobile/perform_interaction_request.cc @@ -205,6 +205,7 @@ void PerformInteractionRequest::Run() { app->set_perform_interaction_mode(static_cast<int32_t>(interaction_mode_)); app->set_perform_interaction_active(true); + app->set_perform_interaction_layout(interaction_layout); // increment amount of active requests ++pi_requests_count_; SendVRPerformInteractionRequest(app); diff --git a/src/components/application_manager/test/commands/mobile/on_keyboard_input_notification_test.cc b/src/components/application_manager/test/commands/mobile/on_keyboard_input_notification_test.cc index d8240dfb62..d56cd98904 100644 --- a/src/components/application_manager/test/commands/mobile/on_keyboard_input_notification_test.cc +++ b/src/components/application_manager/test/commands/mobile/on_keyboard_input_notification_test.cc @@ -108,6 +108,8 @@ TEST_F(OnKeyBoardInputNotificationTest, Run_ActionActive_SUCCESS) { MockAppPtr mock_app(InitAppSetDataAccessor(app_set_)); EXPECT_CALL(*mock_app, is_perform_interaction_active()).WillOnce(Return(1)); + EXPECT_CALL(*mock_app, perform_interaction_layout()) + .WillOnce(Return(mobile_apis::LayoutMode::KEYBOARD)); EXPECT_CALL(*mock_app, hmi_level()).Times(0); EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kConnectionKey)); |