From 7aecb63a17bdc9f38d75cb381143b7eacd9d85fc Mon Sep 17 00:00:00 2001 From: RomanReznichenkoLuxoft <85177915+RomanReznichenkoLuxoft@users.noreply.github.com> Date: Tue, 11 Jan 2022 17:13:23 +0200 Subject: changed the way you add soft buttons in the subscription method (#3839) --- .../sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc | 2 -- .../sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc | 2 -- .../test/commands/mobile/simple_response_commands_test.cc | 1 - src/components/application_manager/src/application_impl.cc | 3 ++- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc index a2362a74bc..7d546079e8 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/show_constant_tbt_response.cc @@ -60,8 +60,6 @@ ShowConstantTBTResponse::~ShowConstantTBTResponse() {} void ShowConstantTBTResponse::Run() { SDL_LOG_AUTO_TRACE(); - application_manager_.UnsubscribeAppFromSoftButtons(message_); - rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc index bf2658128d..bedf91b45c 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/update_turn_list_response.cc @@ -59,8 +59,6 @@ UpdateTurnListResponse::~UpdateTurnListResponse() {} void UpdateTurnListResponse::Run() { SDL_LOG_AUTO_TRACE(); - application_manager_.UnsubscribeAppFromSoftButtons(message_); - rpc_service_.SendMessageToMobile(message_); } diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_response_commands_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_response_commands_test.cc index d091fdc8c5..a6bdf2a874 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_response_commands_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/simple_response_commands_test.cc @@ -149,7 +149,6 @@ TYPED_TEST(MobileResponseWithUnsubscribeCommandsTest, std::shared_ptr command = this->template CreateCommand(); - EXPECT_CALL(this->app_mngr_, UnsubscribeAppFromSoftButtons(_)); EXPECT_CALL(this->mock_rpc_service_, SendMessageToMobile(NotNull(), _)); command->Init(); diff --git a/src/components/application_manager/src/application_impl.cc b/src/components/application_manager/src/application_impl.cc index 42afd93459..9b6e4457d0 100644 --- a/src/components/application_manager/src/application_impl.cc +++ b/src/components/application_manager/src/application_impl.cc @@ -1165,7 +1165,8 @@ void ApplicationImpl::SubscribeToSoftButtons( return; } - WindowSoftButtons new_window_soft_buttons = *subscribed_window_buttons; + WindowSoftButtons new_window_soft_buttons; + new_window_soft_buttons.first = window_id; new_window_soft_buttons.second.insert(window_softbuttons.second.begin(), window_softbuttons.second.end()); command_soft_buttons.erase(subscribed_window_buttons); -- cgit v1.2.1