summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/commands/command_request_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/src/commands/command_request_impl.cc')
-rw-r--r--src/components/application_manager/src/commands/command_request_impl.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/components/application_manager/src/commands/command_request_impl.cc b/src/components/application_manager/src/commands/command_request_impl.cc
index f67fde22a0..06e0220158 100644
--- a/src/components/application_manager/src/commands/command_request_impl.cc
+++ b/src/components/application_manager/src/commands/command_request_impl.cc
@@ -725,12 +725,17 @@ bool CommandRequestImpl::CheckAllowedParameters() {
}
mobile_apis::Result::eType check_result =
- application_manager_.CheckPolicyPermissions(
- app,
- MessageHelper::StringifiedFunctionID(
- static_cast<mobile_api::FunctionID::eType>(function_id())),
- params,
- &parameters_permissions_);
+ mobile_apis::Result::eType::INVALID_ID;
+ const auto current_window_id = window_id();
+ if (app->WindowIdExists(current_window_id)) {
+ check_result = application_manager_.CheckPolicyPermissions(
+ app,
+ current_window_id,
+ MessageHelper::StringifiedFunctionID(
+ static_cast<mobile_api::FunctionID::eType>(function_id())),
+ params,
+ &parameters_permissions_);
+ }
// Check, if RPC is allowed by policy
if (mobile_apis::Result::SUCCESS != check_result) {