summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_external/src/policy_manager_impl.cc
diff options
context:
space:
mode:
authorAndriy Byzhynar (GitHub) <AByzhynar@luxoft.com>2018-10-02 18:14:50 +0300
committerJackLivio <jack@livio.io>2018-10-02 11:14:50 -0400
commitb77a003833a8d917cd51578d397e6965fd7e1258 (patch)
tree336c3fb42e34d848bd59d1a961a6e9385f9e308c /src/components/policy/policy_external/src/policy_manager_impl.cc
parent905fdedf805154f03ab5fd568471665112ac62bf (diff)
downloadsdl_core-b77a003833a8d917cd51578d397e6965fd7e1258.tar.gz
Fix/sdl_does_not_send SDL.OnStatusUpdate(UPDATE_NEEDED) (#2494)
* Add missed RequestSubTypes gathering Added missed request subtypes gathering during app policies section collecting * Fix sending SDL.OnStatusUpdate if existed app registered Added logic of handling case when existed app registered but PTU was unsuccessful from previous IGN cycle NOTE: Fix for EXTERNAL_PROPRIETARY flow * Fix sending SDL.OnStatusUpdate when existed app registered Added logic of handling case when existed app registered but PTU was unsuccessful from previous IGN cycle NOTE: Fix for PROPRIETARY flow * Update update status manager mock classes Updated MockUpdateStatusManager classes for both policy flows: EXTERNAL_PROPRIETARY and PROPRIETARY
Diffstat (limited to 'src/components/policy/policy_external/src/policy_manager_impl.cc')
-rw-r--r--src/components/policy/policy_external/src/policy_manager_impl.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/policy/policy_external/src/policy_manager_impl.cc b/src/components/policy/policy_external/src/policy_manager_impl.cc
index e93eea3969..95304f45a6 100644
--- a/src/components/policy/policy_external/src/policy_manager_impl.cc
+++ b/src/components/policy/policy_external/src/policy_manager_impl.cc
@@ -1922,13 +1922,15 @@ StatusNotifier PolicyManagerImpl::AddApplication(
DeviceConsent device_consent = GetUserConsentForDevice(device_id);
sync_primitives::AutoLock lock(apps_registration_lock_);
if (IsNewApplication(application_id)) {
+ LOG4CXX_DEBUG(logger_, "Adding new application");
AddNewApplication(application_id, device_consent);
return std::make_shared<CallStatusChange>(update_status_manager_,
device_consent);
- } else {
- PromoteExistedApplication(application_id, device_consent);
- return std::make_shared<utils::CallNothing>();
}
+ LOG4CXX_DEBUG(logger_, "Promote existed application");
+ PromoteExistedApplication(application_id, device_consent);
+ update_status_manager_.OnExistedApplicationAdded(cache_->UpdateRequired());
+ return std::make_shared<utils::CallNothing>();
}
void PolicyManagerImpl::RemoveAppConsentForGroup(
@@ -2042,7 +2044,6 @@ bool PolicyManagerImpl::InitPT(const std::string& file_name,
const bool ret = cache_->Init(file_name, settings);
if (ret) {
RefreshRetrySequence();
- update_status_manager_.OnPolicyInit(cache_->UpdateRequired());
}
return ret;
}