diff options
author | jacobkeeler <jacob.keeler@livioradio.com> | 2020-12-11 14:26:38 -0500 |
---|---|---|
committer | jacobkeeler <jacob.keeler@livioradio.com> | 2020-12-11 14:26:38 -0500 |
commit | bac986d1bb48e98330a27167235c47f10a617c23 (patch) | |
tree | 003914799148d56920c9b164a2237e05c944de06 /src/components/policy/policy_external/src/cache_manager.cc | |
parent | 2e5c3ab677e667d86304ee169d32fbd4215d70d0 (diff) | |
download | sdl_core-bac986d1bb48e98330a27167235c47f10a617c23.tar.gz |
Check for revoked apps when reading mandatory policy fieldsfix/revoked_app_policy_fields
Diffstat (limited to 'src/components/policy/policy_external/src/cache_manager.cc')
-rw-r--r-- | src/components/policy/policy_external/src/cache_manager.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/components/policy/policy_external/src/cache_manager.cc b/src/components/policy/policy_external/src/cache_manager.cc index 81a5518cb8..1b5f668e9a 100644 --- a/src/components/policy/policy_external/src/cache_manager.cc +++ b/src/components/policy/policy_external/src/cache_manager.cc @@ -348,7 +348,8 @@ bool CacheManager::CanAppKeepContext(const std::string& app_id) const { bool result = false; if (kDeviceId == app_id) { result = pt_->policy_table.app_policies_section.device.keep_context; - } else if (IsApplicationRepresented(app_id)) { + } else if (IsApplicationRepresented(app_id) && + !IsApplicationRevoked(app_id)) { result = pt_->policy_table.app_policies_section.apps[app_id].keep_context; } return result; @@ -407,7 +408,8 @@ bool CacheManager::CanAppStealFocus(const std::string& app_id) const { bool result = false; if (kDeviceId == app_id) { result = pt_->policy_table.app_policies_section.device.steal_focus; - } else if (IsApplicationRepresented(app_id)) { + } else if (IsApplicationRepresented(app_id) && + !IsApplicationRevoked(app_id)) { result = pt_->policy_table.app_policies_section.apps[app_id].steal_focus; } return result; @@ -422,7 +424,8 @@ bool CacheManager::GetDefaultHMI(const std::string& app_id, if (kDeviceId == app_id) { default_hmi = EnumToJsonString( pt_->policy_table.app_policies_section.device.default_hmi); - } else if (IsApplicationRepresented(app_id)) { + } else if (IsApplicationRepresented(app_id) && + !IsApplicationRevoked(app_id)) { default_hmi = EnumToJsonString( pt_->policy_table.app_policies_section.apps[app_id].default_hmi); } @@ -1820,7 +1823,8 @@ bool CacheManager::GetPriority(const std::string& policy_app_id, policy_table::ApplicationPolicies::const_iterator policy_iter = policies.find(policy_app_id); - const bool app_id_exists = policies.end() != policy_iter; + const bool app_id_exists = + policies.end() != policy_iter && !IsApplicationRevoked(policy_app_id); if (app_id_exists) { priority = EnumToJsonString((*policy_iter).second.priority); } |