summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Koreniak <okoreniak@luxoft.com>2016-03-30 11:25:24 +0300
committerOleksandr Koreniak <okoreniak@luxoft.com>2016-03-30 11:25:24 +0300
commit73b6b7e37d11c1a92353fb66e88451f12be12827 (patch)
tree8b0ee061e66d0c595d3feee8c61ef1dfac501829
parentbe8feae0e11c59e20f8c9b08c32f7f64937e0ee4 (diff)
downloadsdl_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.
-rw-r--r--src/components/application_manager/src/commands/mobile/register_app_interface_request.cc21
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