summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomanReznichenkoLuxoft <85177915+RomanReznichenkoLuxoft@users.noreply.github.com>2021-10-15 21:47:00 +0300
committerGitHub <noreply@github.com>2021-10-15 14:47:00 -0400
commitb7d79fbde866feb8936053578a8790101fbfd292 (patch)
treed19258411af1210759f540573fac6573d87390d2
parenta0bde744aceaf3c989dccf6bf5c7de04c363a675 (diff)
downloadsdl_core-b7d79fbde866feb8936053578a8790101fbfd292.tar.gz
Send a request when the policy table is disabled. (#3767)
-rw-r--r--src/components/application_manager/src/policies/policy_handler.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc
index 202b62ced4..500981a5a8 100644
--- a/src/components/application_manager/src/policies/policy_handler.cc
+++ b/src/components/application_manager/src/policies/policy_handler.cc
@@ -2869,6 +2869,10 @@ void PolicyHandler::UpdateHMILevel(ApplicationSharedPtr app,
bool PolicyHandler::CheckModule(const PTString& app_id,
const PTString& module) {
+ if (!PolicyEnabled()) {
+ SDL_LOG_DEBUG("Policy table is disabled");
+ return true;
+ }
const auto policy_manager = LoadPolicyManager();
POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
return policy_manager->CheckModule(app_id, module);
@@ -2939,6 +2943,10 @@ bool PolicyHandler::CheckHMIType(const std::string& application_id,
mobile_apis::AppHMIType::eType hmi,
const smart_objects::SmartObject* app_types) {
SDL_LOG_AUTO_TRACE();
+ if (!PolicyEnabled()) {
+ SDL_LOG_DEBUG("Policy table is disabled");
+ return true;
+ }
const auto policy_manager = LoadPolicyManager();
POLICY_LIB_CHECK_OR_RETURN(policy_manager, false);
std::vector<int> policy_hmi_types;