diff options
author | Oleksandr Koreniak <okoreniak@luxoft.com> | 2016-03-30 11:25:24 +0300 |
---|---|---|
committer | Oleksandr Koreniak <okoreniak@luxoft.com> | 2016-03-30 11:25:24 +0300 |
commit | 73b6b7e37d11c1a92353fb66e88451f12be12827 (patch) | |
tree | 8b0ee061e66d0c595d3feee8c61ef1dfac501829 /src/components/application_manager | |
parent | be8feae0e11c59e20f8c9b08c32f7f64937e0ee4 (diff) | |
download | sdl_core-73b6b7e37d11c1a92353fb66e88451f12be12827.tar.gz |
Fixed SDL to do not send two OnHMIStatus notification to launched application
Updated processing of RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile().
Added test for the application hmilevel before assigning the default hmilevel and performing resumptions.
Diffstat (limited to 'src/components/application_manager')
-rw-r--r-- | src/components/application_manager/src/commands/mobile/register_app_interface_request.cc | 21 |
1 files changed, 13 insertions, 8 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 36b2c27f7f..a3fe1422cf 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 @@ -513,14 +513,19 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile( SendResponse(true, result, add_info.c_str(), &response_params); - // Default HMI level should be set before any permissions validation, since it - // relies on HMI level. - resumer.SetupDefaultHMILevel(application); - - if (result != mobile_apis::Result::RESUME_FAILED) { - resumer.StartResumption(application, hash_id); - } else { - resumer.StartResumptionOnlyHMILevel(application); + // when application's hmilevel is not defined, we should set + // default and try to perform resumption + // fix for APPLINK-12311 + if (mobile_apis::HMILevel::INVALID_ENUM == application->CurrentHmiState()->hmi_level()) { + // Default HMI level should be set before any permissions validation, since it + // relies on HMI level. + resumer.SetupDefaultHMILevel(application); + + if (result != mobile_apis::Result::RESUME_FAILED) { + resumer.StartResumption(application, hash_id); + } else { + resumer.StartResumptionOnlyHMILevel(application); + } } // By default app subscribed to CUSTOM_BUTTON |