summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjacobkeeler <jacob.keeler@livioradio.com>2019-10-21 15:10:33 -0400
committerjacobkeeler <jacob.keeler@livioradio.com>2019-10-21 15:10:33 -0400
commit686ecf89459e007baf2a9bb2e400f56727ebc4d8 (patch)
tree707e38b719c219aab7d4783c854cd100186fc465
parent4a2647a2c3617bdf25192efd0330fda098136fed (diff)
parentb67c088ea29cd0d7b29f4809a7964b11af80745e (diff)
downloadsdl_core-686ecf89459e007baf2a9bb2e400f56727ebc4d8.tar.gz
Merge remote-tracking branch 'origin/develop' into release/6.0.0
-rw-r--r--src/components/policy/policy_external/src/policy_manager_impl.cc2
-rw-r--r--src/components/policy/policy_external/test/policy_manager_impl_user_consent_test.cc2
2 files changed, 3 insertions, 1 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 2d8df07271..b9eed0be4e 100644
--- a/src/components/policy/policy_external/src/policy_manager_impl.cc
+++ b/src/components/policy/policy_external/src/policy_manager_impl.cc
@@ -1125,7 +1125,7 @@ void PolicyManagerImpl::SetUserConsentForDevice(const std::string& device_id,
"Event listener is not initialized. "
"Can't call OnDeviceConsentChanged");
}
- if (is_allowed) {
+ if (is_allowed && listener_->CanUpdate()) {
update_status_manager_.OnDeviceConsented();
}
StartPTExchange();
diff --git a/src/components/policy/policy_external/test/policy_manager_impl_user_consent_test.cc b/src/components/policy/policy_external/test/policy_manager_impl_user_consent_test.cc
index e42ecbacd7..1db23260a8 100644
--- a/src/components/policy/policy_external/test/policy_manager_impl_user_consent_test.cc
+++ b/src/components/policy/policy_external/test/policy_manager_impl_user_consent_test.cc
@@ -53,6 +53,8 @@ TEST_F(
EXPECT_CALL(listener_, OnCurrentDeviceIdUpdateRequired(_, app_id_1_))
.WillRepeatedly(Return(device_id_1_));
+ EXPECT_CALL(listener_, CanUpdate()).WillRepeatedly(Return(true));
+
policy_manager_->SetUserConsentForDevice(device_id_1_, true);
policy_manager_->AddApplication(