summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc')
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc
index 4f968dd2d8..524e4db7fa 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/rc_command_request.cc
@@ -140,6 +140,14 @@ void RCCommandRequest::Run() {
SendResponse(false, mobile_apis::Result::DISALLOWED, "");
return;
}
+ if (!resource_allocation_manager_.is_rc_enabled()) {
+ LOG4CXX_WARN(logger_, "Remote control is disabled by user");
+ SetResourceState(ModuleType(), ResourceState::FREE);
+ SendResponse(false,
+ mobile_apis::Result::USER_DISALLOWED,
+ "Remote control is disabled by user");
+ return;
+ }
if (CheckDriverConsent()) {
if (AcquireResources()) {