diff options
author | BSolonenko <BSolonenko@luxoft.com> | 2018-03-03 19:06:29 +0200 |
---|---|---|
committer | Ira Lytvynenko (GitHub) <ILytvynenko@luxoft.com> | 2018-06-26 12:01:46 +0300 |
commit | 57aa1c99210a39546106d02a26be82eeb2a7800f (patch) | |
tree | b0bc3878f2e75725548870e381300b47f2f0a96b /src/components/application_manager/src/application_manager_impl.cc | |
parent | f3c20e49e05d65314760e04ed6656fe2d6bcd49c (diff) | |
download | sdl_core-57aa1c99210a39546106d02a26be82eeb2a7800f.tar.gz |
Fixed get RC Applications
- added is_rc_ field, getter and setter in ApplicationImpl;
- fixed RegisterAppInterfaceRequest::Run();
- fixed RCRPCPlugin::GetRCApplications().
Fix UTs
Added is_remote_control_supported and set_remote_control_supported
methods in MockApplication
Fixed on_interior_vehicle_data_notification_test and
resource_allocation_manager_impl_test.
Fixed sending of notifications.
- Fixed RCRPCPlugin::OnPolicyEvent;
- Fixed RCRPCPlugin::OnApplicationEvent;
- Fixed OnExitApplicationNotification::Run;
- Fixed ApplicationManagerImpl::UnregisterApplication;
- Fixed ApplicationManagerImpl::OnPTUFinished;
- Refactoring ApplicationImpl::RemoveExtension;
- is_remote_control_supported_ added in initialization list.
Fix UTs
In application_manager_impl_test added seting RPCPluginManager
Conflicts:
src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc
src/components/application_manager/src/application_manager_impl.cc
Diffstat (limited to 'src/components/application_manager/src/application_manager_impl.cc')
-rw-r--r-- | src/components/application_manager/src/application_manager_impl.cc | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc index 7c32609c1a..18d4ea54d8 100644 --- a/src/components/application_manager/src/application_manager_impl.cc +++ b/src/components/application_manager/src/application_manager_impl.cc @@ -2477,6 +2477,15 @@ void ApplicationManagerImpl::UnregisterApplication( MessageHelper::SendStopAudioPathThru(*this); } +#ifdef SDL_REMOTE_CONTROL + auto on_app_unregistered = + [app_to_remove](plugin_manager::RPCPlugin& plugin) { + plugin.OnApplicationEvent(plugin_manager::kApplicationUnregistered, + app_to_remove); + }; + plugin_manager_->ForEachPlugin(on_app_unregistered); +#endif + MessageHelper::SendOnAppUnregNotificationToHMI( app_to_remove, is_unexpected_disconnect, *this); request_ctrl_.terminateAppRequests(app_id); @@ -2493,7 +2502,7 @@ mobile_apis::Result::eType ApplicationManagerImpl::CheckPolicyPermissions( const std::string& function_id, const RPCParams& rpc_params, CommandParametersPermissions* params_permissions) { - LOG4CXX_INFO(logger_, "CheckPolicyPermissions"); + LOG4CXX_AUTO_TRACE(logger_); // TODO(AOleynik): Remove check of policy_enable, when this flag will be // unused in config file if (!GetPolicyHandler().PolicyEnabled()) { @@ -3301,7 +3310,17 @@ void ApplicationManagerImpl::ProcessReconnection( GetPolicyHandler().AddDevice(device_mac, connection_type); } -void ApplicationManagerImpl::OnPTUFinished(const bool ptu_result) {} +void ApplicationManagerImpl::OnPTUFinished(const bool ptu_result) { + LOG4CXX_AUTO_TRACE(logger_); + if (!ptu_result) { + return; + } + auto on_app_policy_updated = [](plugin_manager::RPCPlugin& plugin) { + plugin.OnPolicyEvent(plugin_manager::kApplicationPolicyUpdated); + }; + + plugin_manager_->ForEachPlugin(on_app_policy_updated); +} void ApplicationManagerImpl::PutDriverDistractionMessageToPostponed( ApplicationSharedPtr application) const { |