diff options
author | Andrey Oleynik (GitHub) <aoleynik@luxoft.com> | 2017-11-13 12:43:10 +0200 |
---|---|---|
committer | Andriy Byzhynar <AByzhynar@luxoft.com> | 2018-01-18 12:03:51 +0200 |
commit | f748016ac120963bee90945b6bf256d2de02ece4 (patch) | |
tree | 6b9d57d8b4c2fd333f58eca3da578c1af281a0d6 | |
parent | 48f0999d896d828b78eaeef825d1ec6b1a46fa4b (diff) | |
download | sdl_core-f748016ac120963bee90945b6bf256d2de02ece4.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.cc | 8 |
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); |