From 6e904b19cbc4abc6cd5a5d8049783a4ba42d446c Mon Sep 17 00:00:00 2001 From: Andriy Byzhynar Date: Wed, 10 Jul 2019 18:58:35 +0300 Subject: Add app automatic subscription to "DISPLAY" capabilities updates --- .../rpc_plugins/sdl_rpc_plugin/src/sdl_rpc_plugin.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_rpc_plugin.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_rpc_plugin.cc index b261b20c24..4cc197d766 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_rpc_plugin.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/sdl_rpc_plugin.cc @@ -70,8 +70,14 @@ void SDLRPCPlugin::OnApplicationEvent( plugins::ApplicationEvent event, app_mngr::ApplicationSharedPtr application) { if (plugins::ApplicationEvent::kApplicationRegistered == event) { - application->AddExtension( - std::make_shared(*this, *application)); + auto sys_cap_ext_ptr = + std::make_shared(*this, *application); + application->AddExtension(sys_cap_ext_ptr); + // Processing automatic subscription to SystemCapabilities for DISPLAY type + const auto capability_type = + mobile_apis::SystemCapabilityType::eType::DISPLAY; + LOG4CXX_DEBUG(logger_, "Subscription to DISPLAY capability is enabled"); + sys_cap_ext_ptr->SubscribeTo(capability_type); } else if (plugins::ApplicationEvent::kDeleteApplicationData == event) { ClearSubscriptions(application); } -- cgit v1.2.1