From b7d79fbde866feb8936053578a8790101fbfd292 Mon Sep 17 00:00:00 2001 From: RomanReznichenkoLuxoft <85177915+RomanReznichenkoLuxoft@users.noreply.github.com> Date: Fri, 15 Oct 2021 21:47:00 +0300 Subject: Send a request when the policy table is disabled. (#3767) --- src/components/application_manager/src/policies/policy_handler.cc | 8 ++++++++ 1 file changed, 8 insertions(+) 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 policy_hmi_types; -- cgit v1.2.1