summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/resumption/resume_ctrl_impl.cc
diff options
context:
space:
mode:
authorAKalinich-Luxoft <AKalinich@luxoft.com>2018-07-06 19:55:38 +0300
committerAKalinich-Luxoft <AKalinich@luxoft.com>2018-07-11 20:50:08 +0300
commit1c57695b83f1d680a8ea23513378e6c6248210da (patch)
tree94f9326fef177b03c6752781b45e50fe21ddf0af /src/components/application_manager/src/resumption/resume_ctrl_impl.cc
parent6371b7b64145971fbf31c5f0e20de83f2d5d73bb (diff)
downloadsdl_core-1c57695b83f1d680a8ea23513378e6c6248210da.tar.gz
Fix failed ATF tests after timer removing
Fixed triggering SetGlobalProperties after resumption and during resumption Fixed commands limit after resumption Fixed requests counter Removed redundant logic
Diffstat (limited to 'src/components/application_manager/src/resumption/resume_ctrl_impl.cc')
-rw-r--r--src/components/application_manager/src/resumption/resume_ctrl_impl.cc18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/components/application_manager/src/resumption/resume_ctrl_impl.cc b/src/components/application_manager/src/resumption/resume_ctrl_impl.cc
index d75237e0be..def618f965 100644
--- a/src/components/application_manager/src/resumption/resume_ctrl_impl.cc
+++ b/src/components/application_manager/src/resumption/resume_ctrl_impl.cc
@@ -162,17 +162,7 @@ bool ResumeCtrlImpl::RestoreAppHMIState(ApplicationSharedPtr application) {
static_cast<mobile_apis::HMILevel::eType>(
saved_app[strings::hmi_level].asInt());
LOG4CXX_DEBUG(logger_, "Saved HMI Level is : " << saved_hmi_level);
- result = SetAppHMIState(application, saved_hmi_level, true);
- if (result) {
- const HMILevel::eType def_hmi_level =
- application_manager_.GetDefaultHmiLevel(application);
- if (def_hmi_level != saved_hmi_level) {
- auto& help_prompt_manager = application->help_prompt_manager();
- const bool is_restore = true;
- help_prompt_manager.OnAppActivated(is_restore);
- }
- }
- return result;
+ return SetAppHMIState(application, saved_hmi_level, true);
} else {
result = false;
LOG4CXX_ERROR(logger_, "saved app data corrupted");
@@ -555,8 +545,12 @@ void ResumeCtrlImpl::AddCommands(ApplicationSharedPtr application,
saved_app[strings::application_commands];
for (size_t i = 0; i < app_commands.length(); ++i) {
const smart_objects::SmartObject& command = app_commands[i];
+ const uint32_t cmd_id = command[strings::cmd_id].asUInt();
+ const bool is_resumption = true;
- application->AddCommand(command[strings::cmd_id].asUInt(), command);
+ application->AddCommand(cmd_id, command);
+ application->help_prompt_manager().OnVrCommandAdded(
+ cmd_id, command, is_resumption);
}
ProcessHMIRequests(MessageHelper::CreateAddCommandRequestToHMI(
application, application_manager_));