diff options
author | Andrey Oleynik <aoleynik@luxoft.com> | 2016-12-12 12:48:09 +0200 |
---|---|---|
committer | Andrey Oleynik <aoleynik@luxoft.com> | 2016-12-13 10:00:56 +0200 |
commit | 088bc6dbd4a59b4bcea423accef081cb7beae889 (patch) | |
tree | 441bd2f7b27478cf0d5e9c10d7fe1c44336e6b34 /src/components/application_manager/src/commands | |
parent | b347ffc69e7fbc6049cf634958344385e8f366b2 (diff) | |
download | sdl_core-088bc6dbd4a59b4bcea423accef081cb7beae889.tar.gz |
Fixes order of notification sending during application registration
According to requirement OnAppRegistered notification must be sent before
OnHMIStatus and OnPermissionsChanged
Closes-bug: APPLINK-30566
Diffstat (limited to 'src/components/application_manager/src/commands')
2 files changed, 9 insertions, 9 deletions
diff --git a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc b/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc index 9ae2bac73c..471a54336d 100644 --- a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc +++ b/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc @@ -638,6 +638,15 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile() { SendOnAppRegisteredNotificationToHMI( *(application.get()), resumption, need_restore_vr); + // Default HMI level should be set before any permissions validation, since it + // relies on HMI level. + application_manager_.OnApplicationRegistered(application); + + // Sends OnPermissionChange notification to mobile right after RAI response + // and HMI level set-up + application_manager_.GetPolicyHandler().OnAppRegisteredOnMobile( + application->policy_app_id()); + if (result_code != mobile_apis::Result::RESUME_FAILED) { resumer.StartResumption(application, hash_id); } else { diff --git a/src/components/application_manager/src/commands/mobile/register_app_interface_response.cc b/src/components/application_manager/src/commands/mobile/register_app_interface_response.cc index 1d7f829a68..3e94e652d4 100644 --- a/src/components/application_manager/src/commands/mobile/register_app_interface_response.cc +++ b/src/components/application_manager/src/commands/mobile/register_app_interface_response.cc @@ -77,15 +77,6 @@ void RegisterAppInterfaceResponse::Run() { } SetHeartBeatTimeout(connection_key(), application->policy_app_id()); - - // Default HMI level should be set before any permissions validation, since it - // relies on HMI level. - application_manager_.OnApplicationRegistered(application); - - // Sends OnPermissionChange notification to mobile right after RAI response - // and HMI level set-up - application_manager_.GetPolicyHandler().OnAppRegisteredOnMobile( - application->policy_app_id()); } void RegisterAppInterfaceResponse::SetHeartBeatTimeout( |