summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Oleynik (GitHub) <aoleynik@luxoft.com>2017-11-13 12:43:10 +0200
committerAndrey Oleynik (GitHub) <aoleynik@luxoft.com>2017-11-27 09:28:50 +0200
commit2853541b9f5659132896a161630d512ce5af9dce (patch)
tree83ce12311abae8a21968470d514f62ec89dc3305
parent3d46a724ad7df9a5e88023333f61f549025acb64 (diff)
downloadsdl_core-2853541b9f5659132896a161630d512ce5af9dce.tar.gz
Fixes resume issue for application on switching transport
In case app has been just registrered in previous session and didn't sent any data to resume later and then re-registers over new transport due to switch there is nothing to resume so RAI result should be SUCCESS
-rw-r--r--src/components/application_manager/src/commands/mobile/register_app_interface_request.cc8
1 files changed, 7 insertions, 1 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 6088e46e06..4dd14e2075 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
@@ -674,7 +674,13 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile(
LOG4CXX_DEBUG(logger_,
"Application has been switched from another transport.");
- if (!resumption || mobile_apis::Result::RESUME_FAILED == result_code) {
+ if (hash_id.empty() && resumer.CheckApplicationHash(application, hash_id)) {
+ LOG4CXX_INFO(logger_,
+ "Application does not have hashID saved and neither "
+ "provided it with RAI. Nothing to resume.");
+ result_code = mobile_apis::Result::SUCCESS;
+ } else if (!resumption ||
+ mobile_apis::Result::RESUME_FAILED == result_code) {
application_manager::RecallApplicationData(application,
application_manager_);
resumer.RemoveApplicationFromSaved(application);