diff options
author | Shobhit Adlakha <ShobhitAd@users.noreply.github.com> | 2020-03-19 13:41:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-19 13:41:25 -0400 |
commit | b51affe9d89655c5b3bc5199f030bf2bc1eb190c (patch) | |
tree | 132f3e2ba634520397c6ec8f52076e355a052156 | |
parent | 15b80391c957d7cc16bce40ff69b14fb1958a3f6 (diff) | |
download | sdl_core-b51affe9d89655c5b3bc5199f030bf2bc1eb190c.tar.gz |
Fix/Checking PTU triggers when no apps are registered in regular policy mode (#3294)
* Trigger PTExchange when Device consent is enabled
* Move StartPTExchange call to BC.OnReady
* StartPTExchange is a protected function. Add TriggerPTUIfNeeded to the policy_manager as well
* Fixed GetPolicyHandler call in BC.OnReady
* Add mock definitions
* Fix failed ut
* Handle PolicyUpdate error response
* Add reset retry sequence
* Revert "Move StartPTExchange call to BC.OnReady"
This reverts commit 7c53978b2e7a42ed51cb856d054dce88e040e8ea.
Co-authored-by: JackLivio <jack@livio.io>
-rw-r--r-- | src/components/policy/policy_regular/src/policy_manager_impl.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/components/policy/policy_regular/src/policy_manager_impl.cc b/src/components/policy/policy_regular/src/policy_manager_impl.cc index b3354500e8..8d4db9e675 100644 --- a/src/components/policy/policy_regular/src/policy_manager_impl.cc +++ b/src/components/policy/policy_regular/src/policy_manager_impl.cc @@ -926,6 +926,9 @@ void PolicyManagerImpl::SetUserConsentForDevice(const std::string& device_id, DeviceConsent current_consent = GetUserConsentForDevice(device_id); bool is_current_device_allowed = DeviceConsent::kDeviceAllowed == current_consent ? true : false; + if (is_allowed) { + StartPTExchange(); + } if (DeviceConsent::kDeviceHasNoConsent != current_consent && is_current_device_allowed == is_allowed) { const std::string consent = is_allowed ? "allowed" : "disallowed"; |