From 9d447c8f69dc0d59ca370a9379df73b73a57fe63 Mon Sep 17 00:00:00 2001 From: Aleksandr Kutsan Date: Wed, 1 Jul 2020 21:00:21 +0300 Subject: Close connection after RESOURCE_CONSTRAINT RESOURCE_CONSTRAINT unregister reason will close connection for all applications, but not only Web engine projection --- .../src/commands/mobile/on_app_interface_unregistered_notification.cc | 4 +--- .../mobile/on_app_interface_unregistered_notification_test.cc | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc index 12c59390cd..30d9853d97 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc @@ -63,11 +63,9 @@ void OnAppInterfaceUnregisteredNotification::Run() { bool OnAppInterfaceUnregisteredNotification::IsFinalMessage() const { using Reason = mobile_apis::AppInterfaceUnregisteredReason::eType; - const auto app = application_manager_.application(connection_key()); const auto reason = static_cast( (*message_)[strings::msg_params][strings::reason].asInt()); - return app && app->webengine_projection_enabled() && - Reason::RESOURCE_CONSTRAINT == reason; + return Reason::RESOURCE_CONSTRAINT == reason; } } // namespace commands } // namespace sdl_rpc_plugin diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_app_interface_unregistered_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_app_interface_unregistered_notification_test.cc index ef7ef7a091..64dcec2e0a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_app_interface_unregistered_notification_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_app_interface_unregistered_notification_test.cc @@ -116,7 +116,7 @@ TEST_F(OnAppInterfaceUnregisteredNotificationTest, (*message_)[am::strings::msg_params][am::strings::reason] = Reason::RESOURCE_CONSTRAINT; - CheckResponseParameters(false, false); + CheckResponseParameters(false, true); ASSERT_TRUE(command_->Init()); command_->Run(); -- cgit v1.2.1