diff options
author | Andrey Oleynik <aoleynik@luxoft.com> | 2017-08-18 23:00:29 +0300 |
---|---|---|
committer | Andrey Oleynik <aoleynik@luxoft.com> | 2017-08-21 15:59:12 +0300 |
commit | f836fc40f0a1174dc83eee756ca3c2e51d760879 (patch) | |
tree | 2a2463a703b7ec9137d2bd33d18484f28f5e23a9 /src/components | |
parent | f27c9ad0c5226152e580219dde0b0f17042c83ca (diff) | |
download | sdl_core-f836fc40f0a1174dc83eee756ca3c2e51d760879.tar.gz |
Removes unused functionality from CheckAccess() interface
Diffstat (limited to 'src/components')
23 files changed, 81 insertions, 173 deletions
diff --git a/src/components/application_manager/include/application_manager/core_service.h b/src/components/application_manager/include/application_manager/core_service.h index c5dcc975df..9a89bf51a1 100644 --- a/src/components/application_manager/include/application_manager/core_service.h +++ b/src/components/application_manager/include/application_manager/core_service.h @@ -71,24 +71,19 @@ class CoreService : public Service { mobile_apis::Result::eType CheckPolicyPermissions(MessagePtr msg) FINAL; /** - * Checks access to requested equipment of vehicle + * Checks access to requested module of vehicle * @param app_id id of application * @param module type - * @param rpc name of rpc - * @param params parameters list - * @return return allowed if access exist, - * manual if need to send question to driver otherwise disallowed + * @return return allowed if module is allowed, otherwise - disallowed */ TypeAccess CheckAccess(const ApplicationId& app_id, - const std::string& module, - const std::string& rpc, - const std::vector<std::string>& params) FINAL; + const std::string& module) FINAL; /** - * Checks access to module for application + * Checks if module for application is present in policy table * @param app_id id of application * @param module type - * @return true if module is allowed for application + * @return true if module is present, otherwise - false */ bool CheckModule(const ApplicationId& app_id, const std::string& module) FINAL; diff --git a/src/components/application_manager/include/application_manager/policies/policy_handler.h b/src/components/application_manager/include/application_manager/policies/policy_handler.h index 352c9826a5..3936530d38 100644 --- a/src/components/application_manager/include/application_manager/policies/policy_handler.h +++ b/src/components/application_manager/include/application_manager/policies/policy_handler.h @@ -144,25 +144,21 @@ class PolicyHandler : public PolicyHandlerInterface, const std::string& hmi_level) OVERRIDE; /** - * Checks access to equipment of vehicle for application by RPC + * Checks access to module of vehicle for application * @param device_id unique identifier of device * @param app_id policy id application - * @param module type - * @param rpc name of rpc - * @param params parameters list + * @param module module name + * @return Allowed if module is allowed, otherwise disallowed */ - application_manager::TypeAccess CheckAccess( - const PTString& device_id, - const PTString& app_id, - const PTString& module, - const std::string& rpc, - const std::vector<PTString>& params) OVERRIDE; + application_manager::TypeAccess CheckAccess(const PTString& device_id, + const PTString& app_id, + const PTString& module) OVERRIDE; /** - * Checks access to module for application - * @param app_id policy id application - * @param module - * @return true if module is allowed for application + * Checks if module for application is present in policy table + * @param app_id id of application + * @param module type + * @return true if module is present, otherwise - false */ bool CheckModule(const PTString& app_id, const PTString& module) OVERRIDE; diff --git a/src/components/application_manager/include/application_manager/service.h b/src/components/application_manager/include/application_manager/service.h index a1d8d58a48..9f59d58c26 100644 --- a/src/components/application_manager/include/application_manager/service.h +++ b/src/components/application_manager/include/application_manager/service.h @@ -42,7 +42,7 @@ namespace application_manager { -enum TypeAccess { kNone, kDisallowed, kAllowed, kManual }; +enum TypeAccess { kNone, kDisallowed, kAllowed }; enum MessageValidationResult { SUCCESS = 0, @@ -70,24 +70,20 @@ class Service { virtual mobile_apis::Result::eType CheckPolicyPermissions(MessagePtr msg) = 0; /** - * Checks access to requested equipment of vehicle - * @param app_id id of application - * @param module type - * @param rpc name of rpc - * @param params parameters list - * @return return allowed if access exist, - * manual if need to send question to driver otherwise disallowed + * Checks access to module of vehicle for application + * @param device_id unique identifier of device + * @param app_id policy id application + * @param module module name + * @return Allowed if module is allowed, otherwise disallowed */ virtual TypeAccess CheckAccess(const ApplicationId& app_id, - const std::string& module, - const std::string& rpc, - const std::vector<std::string>& params) = 0; + const std::string& module) = 0; /** - * Checks access to module for application + * Checks if module for application is present in policy table * @param app_id id of application * @param module type - * @return true if module is allowed for application + * @return true if module is present, otherwise - false */ virtual bool CheckModule(const ApplicationId& app_id, const std::string& module) = 0; diff --git a/src/components/application_manager/src/core_service.cc b/src/components/application_manager/src/core_service.cc index 6bb5ece4ec..f30115443f 100644 --- a/src/components/application_manager/src/core_service.cc +++ b/src/components/application_manager/src/core_service.cc @@ -83,16 +83,14 @@ mobile_apis::Result::eType CoreService::CheckPolicyPermissions(MessagePtr msg) { } TypeAccess CoreService::CheckAccess(const ApplicationId& app_id, - const std::string& module, - const std::string& rpc, - const std::vector<std::string>& params) { + const std::string& module) { #ifdef SDL_REMOTE_CONTROL ApplicationSharedPtr app = GetApplication(app_id); if (app) { std::string device_handle = MessageHelper::GetDeviceMacAddressForHandle( app->device(), application_manager_); return application_manager_.GetPolicyHandler().CheckAccess( - device_handle, app->policy_app_id(), module, rpc, params); + device_handle, app->policy_app_id(), module); } #endif // SDL_REMOTE_CONTROL return kNone; diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc index 49d79dd92e..c9ea98c759 100644 --- a/src/components/application_manager/src/policies/policy_handler.cc +++ b/src/components/application_manager/src/policies/policy_handler.cc @@ -1962,9 +1962,6 @@ application_manager::TypeAccess ConvertTypeAccess(policy::TypeAccess access) { case policy::TypeAccess::kAllowed: converted = application_manager::TypeAccess::kAllowed; break; - case policy::TypeAccess::kManual: - converted = application_manager::TypeAccess::kManual; - break; case policy::TypeAccess::kDisallowed: converted = application_manager::TypeAccess::kDisallowed; break; @@ -1996,14 +1993,10 @@ void PolicyHandler::UpdateHMILevel(ApplicationSharedPtr app, } application_manager::TypeAccess PolicyHandler::CheckAccess( - const PTString& device_id, - const PTString& app_id, - const PTString& module, - const std::string& rpc, - const std::vector<PTString>& params) { + const PTString& device_id, const PTString& app_id, const PTString& module) { POLICY_LIB_CHECK(application_manager::TypeAccess::kNone); policy::TypeAccess access = - policy_manager_->CheckAccess(device_id, app_id, module, rpc, params); + policy_manager_->CheckAccess(device_id, app_id, module); return ConvertTypeAccess(access); } diff --git a/src/components/application_manager/test/rc_policy_handler_test.cc b/src/components/application_manager/test/rc_policy_handler_test.cc index 0a50dd230f..2e2e713e1b 100644 --- a/src/components/application_manager/test/rc_policy_handler_test.cc +++ b/src/components/application_manager/test/rc_policy_handler_test.cc @@ -275,26 +275,21 @@ TEST_F(RCPolicyHandlerTest, CheckAccess_ValidParams_SUCCESS) { const std::vector<PTString> params; EXPECT_CALL(*mock_policy_manager_, - CheckAccess(kDeviceId_, kPolicyAppId_, module, pt_rpc, _)) + CheckAccess(kDeviceId_, kPolicyAppId_, module)) .WillOnce(Return(policy::TypeAccess::kDisallowed)); EXPECT_EQ(application_manager::TypeAccess::kDisallowed, - policy_handler_.CheckAccess( - kDeviceId_, kPolicyAppId_, module, pt_rpc, params)); + policy_handler_.CheckAccess(kDeviceId_, kPolicyAppId_, module)); EXPECT_CALL(*mock_policy_manager_, - CheckAccess(kDeviceId_, kPolicyAppId_, module, pt_rpc, _)) + CheckAccess(kDeviceId_, kPolicyAppId_, module)) .WillOnce(Return(policy::TypeAccess::kAllowed)); EXPECT_EQ(application_manager::TypeAccess::kAllowed, - policy_handler_.CheckAccess( - kDeviceId_, kPolicyAppId_, module, pt_rpc, params)); + policy_handler_.CheckAccess(kDeviceId_, kPolicyAppId_, module)); EXPECT_CALL(*mock_policy_manager_, - CheckAccess(kDeviceId_, kPolicyAppId_, module, pt_rpc, _)) + CheckAccess(kDeviceId_, kPolicyAppId_, module)) .WillOnce(Return(policy::TypeAccess::kManual)); - EXPECT_EQ(application_manager::TypeAccess::kManual, - policy_handler_.CheckAccess( - kDeviceId_, kPolicyAppId_, module, pt_rpc, params)); } TEST_F(RCPolicyHandlerTest, SetAccess_ValidParams_SUCCESS) { diff --git a/src/components/functional_module/test/include/mock_service.h b/src/components/functional_module/test/include/mock_service.h index 1d97558297..b8e8c40d34 100644 --- a/src/components/functional_module/test/include/mock_service.h +++ b/src/components/functional_module/test/include/mock_service.h @@ -56,11 +56,9 @@ class MockService : public Service { void(ApplicationSharedPtr app, mobile_apis::HMILevel::eType level)); MOCK_CONST_METHOD0(GetRCCapabilities, const smart_objects::SmartObject*()); - MOCK_METHOD4(CheckAccess, + MOCK_METHOD2(CheckAccess, TypeAccess(const ApplicationId& app_id, - const std::string& module, - const std::string& rpc, - const std::vector<std::string>& params)); + const std::string& module)); MOCK_METHOD2(CheckModule, bool(const ApplicationId& app_id, const std::string& module)); MOCK_METHOD3(SetAccess, diff --git a/src/components/include/application_manager/policies/policy_handler_interface.h b/src/components/include/application_manager/policies/policy_handler_interface.h index 5f7b6c5833..d4a13ab542 100644 --- a/src/components/include/application_manager/policies/policy_handler_interface.h +++ b/src/components/include/application_manager/policies/policy_handler_interface.h @@ -449,25 +449,22 @@ class PolicyHandlerInterface { const std::string& hmi_level) = 0; /** - * Checks access to equipment of vehicle for application by RPC + * Checks access to module of vehicle for application * @param device_id unique identifier of device * @param app_id policy id application - * @param module type - * @param rpc name of rpc - * @param params parameters list + * @param module module name + * @return Allowed if module is allowed, otherwise disallowed */ virtual application_manager::TypeAccess CheckAccess( const PTString& device_id, const PTString& app_id, - const PTString& module, - const std::string& rpc, - const std::vector<PTString>& params) = 0; + const PTString& module) = 0; /** - * Checks access to module for application - * @param app_id policy id application - * @param module - * @return true if module is allowed for application + * Checks if module for application is present in policy table + * @param app_id id of application + * @param module type + * @return true if module is present, otherwise - false */ virtual bool CheckModule(const PTString& app_id, const PTString& module) = 0; diff --git a/src/components/include/policy/policy_external/policy/policy_manager.h b/src/components/include/policy/policy_external/policy/policy_manager.h index fd3371bd06..2c5b41f410 100644 --- a/src/components/include/policy/policy_external/policy/policy_manager.h +++ b/src/components/include/policy/policy_external/policy/policy_manager.h @@ -522,24 +522,21 @@ class PolicyManager : public usage_statistics::StatisticsManager { std::vector<int>* app_types) = 0; /** - * Checks access to equipment of vehicle for application by RPC + * Checks access to module of vehicle for application * @param device_id unique identifier of device * @param app_id policy id application - * @param module - * @param rpc name of rpc - * @param params parameters list + * @param module module name + * @return Allowed if module is allowed, otherwise disallowed */ virtual TypeAccess CheckAccess(const PTString& device_id, const PTString& app_id, - const PTString& module, - const PTString& rpc, - const RemoteControlParams& params) = 0; + const PTString& module) = 0; /** - * Checks access to module for application - * @param app_id policy id application - * @param module - * @return true if module is allowed for application + * Checks if module for application is present in policy table + * @param app_id id of application + * @param module type + * @return true if module is present, otherwise - false */ virtual bool CheckModule(const PTString& app_id, const PTString& module) = 0; diff --git a/src/components/include/policy/policy_regular/policy/policy_manager.h b/src/components/include/policy/policy_regular/policy/policy_manager.h index 900f076395..1e554c87b7 100644 --- a/src/components/include/policy/policy_regular/policy/policy_manager.h +++ b/src/components/include/policy/policy_regular/policy/policy_manager.h @@ -496,24 +496,21 @@ class PolicyManager : public usage_statistics::StatisticsManager { std::vector<int>* app_types) = 0; /** - * Checks access to equipment of vehicle for application by RPC + * Checks access to module of vehicle for application * @param device_id unique identifier of device * @param app_id policy id application - * @param module - * @param rpc name of rpc - * @param params parameters list + * @param module module name + * @return Allowed if module is allowed, otherwise disallowed */ virtual TypeAccess CheckAccess(const PTString& device_id, const PTString& app_id, - const PTString& module, - const PTString& rpc, - const RemoteControlParams& params) = 0; + const PTString& module) = 0; /** - * Checks access to module for application - * @param app_id policy id application - * @param module - * @return true if module is allowed for application + * Checks if module for application is present in policy table + * @param app_id id of application + * @param module type + * @return true if module is present, otherwise - false */ virtual bool CheckModule(const PTString& app_id, const PTString& module) = 0; diff --git a/src/components/include/test/application_manager/policies/mock_policy_handler_interface.h b/src/components/include/test/application_manager/policies/mock_policy_handler_interface.h index 56c7ff9b91..d012e7bc76 100644 --- a/src/components/include/test/application_manager/policies/mock_policy_handler_interface.h +++ b/src/components/include/test/application_manager/policies/mock_policy_handler_interface.h @@ -236,13 +236,11 @@ class MockPolicyHandlerInterface : public policy::PolicyHandlerInterface { bool(const std::string& application_id, mobile_apis::AppHMIType::eType hmi, const smart_objects::SmartObject* app_types)); - MOCK_METHOD5(CheckAccess, - application_manager::TypeAccess( - const policy::PTString& device_id, - const policy::PTString& app_id, - const policy::PTString& module, - const std::string& rpc, - const std::vector<policy::PTString>& params)); + MOCK_METHOD3( + CheckAccess, + application_manager::TypeAccess(const policy::PTString& device_id, + const policy::PTString& app_id, + const policy::PTString& module)); MOCK_METHOD2(CheckModule, bool(const policy::PTString& app_id, diff --git a/src/components/include/test/policy/policy_external/policy/mock_policy_manager.h b/src/components/include/test/policy/policy_external/policy/mock_policy_manager.h index 399ae51169..500026f840 100644 --- a/src/components/include/test/policy/policy_external/policy/mock_policy_manager.h +++ b/src/components/include/test/policy/policy_external/policy/mock_policy_manager.h @@ -155,12 +155,10 @@ class MockPolicyManager : public PolicyManager { MOCK_METHOD2(GetHMITypes, bool(const std::string& application_id, std::vector<int>* app_types)); - MOCK_METHOD5(CheckAccess, + MOCK_METHOD3(CheckAccess, TypeAccess(const PTString& device_id, const PTString& app_id, - const PTString& module, - const PTString& rpc, - const RemoteControlParams& params)); + const PTString& module)); MOCK_METHOD2(CheckModule, bool(const PTString& app_id, const PTString& module)); MOCK_METHOD4(SetAccess, diff --git a/src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h b/src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h index a155a0b07f..eaaad2b9bf 100644 --- a/src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h +++ b/src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h @@ -154,12 +154,10 @@ class MockPolicyManager : public PolicyManager { MOCK_METHOD2(GetHMITypes, bool(const std::string& application_id, std::vector<int>* app_types)); - MOCK_METHOD5(CheckAccess, + MOCK_METHOD3(CheckAccess, TypeAccess(const PTString& device_id, const PTString& app_id, - const PTString& module, - const PTString& rpc, - const RemoteControlParams& params)); + const PTString& module)); MOCK_METHOD2(CheckModule, bool(const PTString& app_id, const PTString& module)); MOCK_METHOD4(SetAccess, diff --git a/src/components/policy/policy_external/include/policy/access_remote.h b/src/components/policy/policy_external/include/policy/access_remote.h index 07efe25682..4a98c61dbb 100644 --- a/src/components/policy/policy_external/include/policy/access_remote.h +++ b/src/components/policy/policy_external/include/policy/access_remote.h @@ -42,7 +42,7 @@ namespace policy_table = ::rpc::policy_table_interface_base; namespace policy { -enum TypeAccess { kDisallowed, kAllowed, kManual }; +enum TypeAccess { kDisallowed, kAllowed }; inline std::ostream& operator<<(std::ostream& output, TypeAccess x) { output << "Access: "; switch (x) { @@ -52,9 +52,6 @@ inline std::ostream& operator<<(std::ostream& output, TypeAccess x) { case kAllowed: output << "ALLOWED"; break; - case kManual: - output << "MANUAL"; - break; default: output << "Error: Unknown type"; } diff --git a/src/components/policy/policy_external/include/policy/policy_manager_impl.h b/src/components/policy/policy_external/include/policy/policy_manager_impl.h index 952aa5d32e..03de40191d 100644 --- a/src/components/policy/policy_external/include/policy/policy_manager_impl.h +++ b/src/components/policy/policy_external/include/policy/policy_manager_impl.h @@ -391,9 +391,7 @@ class PolicyManagerImpl : public PolicyManager { Permissions* data); virtual TypeAccess CheckAccess(const PTString& device_id, const PTString& app_id, - const PTString& module, - const PTString& rpc, - const RemoteControlParams& params); + const PTString& module); virtual bool CheckModule(const PTString& app_id, const PTString& module); virtual void SetAccess(const PTString& dev_id, const PTString& app_id, diff --git a/src/components/policy/policy_external/src/policy_manager_impl.cc b/src/components/policy/policy_external/src/policy_manager_impl.cc index 82ef7b8e6c..d37f43a515 100644 --- a/src/components/policy/policy_external/src/policy_manager_impl.cc +++ b/src/components/policy/policy_external/src/policy_manager_impl.cc @@ -1982,13 +1982,7 @@ TypeAccess PolicyManagerImpl::CheckAccess(const PTString& device_id, policy_table::ModuleType module_type; bool is_valid = EnumFromJsonString(module, &module_type); if (is_valid && access_remote_->CheckModuleType(app_id, module_type)) { - if (access_remote_->IsPrimaryDevice(device_id)) { - return TypeAccess::kAllowed; - } else { - Subject who = {device_id, app_id}; - Object what = {module_type}; - return CheckDriverConsent(who, what, rpc, params); - } + return TypeAccess::kAllowed; } LOG4CXX_DEBUG(logger_, TypeAccess::kDisallowed); return TypeAccess::kDisallowed; diff --git a/src/components/policy/policy_regular/include/policy/policy_manager_impl.h b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h index 868328bcb4..f43f4a4809 100644 --- a/src/components/policy/policy_regular/include/policy/policy_manager_impl.h +++ b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h @@ -362,9 +362,7 @@ class PolicyManagerImpl : public PolicyManager { Permissions* data); virtual TypeAccess CheckAccess(const PTString& device_id, const PTString& app_id, - const PTString& module, - const PTString& rpc, - const RemoteControlParams& params); + const PTString& module); virtual bool CheckModule(const PTString& app_id, const PTString& module); virtual void SetAccess(const PTString& dev_id, const PTString& app_id, diff --git a/src/components/policy/policy_regular/src/policy_manager_impl.cc b/src/components/policy/policy_regular/src/policy_manager_impl.cc index e2cdbbf1c4..81f87fb73c 100644 --- a/src/components/policy/policy_regular/src/policy_manager_impl.cc +++ b/src/components/policy/policy_regular/src/policy_manager_impl.cc @@ -1205,22 +1205,14 @@ bool PolicyManagerImpl::GetHMITypes(const std::string& application_id, TypeAccess PolicyManagerImpl::CheckAccess(const PTString& device_id, const PTString& app_id, - const PTString& module, - const PTString& rpc, - const RemoteControlParams& params) { + const PTString& module) { LOG4CXX_AUTO_TRACE(logger_); LOG4CXX_DEBUG(logger_, "Module type: " << module); policy_table::ModuleType module_type; bool is_valid = EnumFromJsonString(module, &module_type); if (is_valid && access_remote_->CheckModuleType(app_id, module_type)) { - if (access_remote_->IsPrimaryDevice(device_id)) { - return TypeAccess::kAllowed; - } else { - Subject who = {device_id, app_id}; - Object what = {module_type}; - return CheckDriverConsent(who, what, rpc, params); - } + return TypeAccess::kAllowed; } LOG4CXX_DEBUG(logger_, TypeAccess::kDisallowed); return TypeAccess::kDisallowed; diff --git a/src/components/remote_control/include/remote_control/commands/base_command_request.h b/src/components/remote_control/include/remote_control/commands/base_command_request.h index 120fff6f2f..2ef7f19cec 100644 --- a/src/components/remote_control/include/remote_control/commands/base_command_request.h +++ b/src/components/remote_control/include/remote_control/commands/base_command_request.h @@ -277,8 +277,6 @@ class BaseCommandRequest */ bool AqcuireResources(); inline bool IsAutoAllowed(application_manager::TypeAccess access) const; - inline bool IsNeededDriverConsent( - application_manager::TypeAccess access) const; void SendDisallowed(application_manager::TypeAccess access); void SendGetUserConsent(const Json::Value& value); void ProcessAccessResponse( diff --git a/src/components/remote_control/src/commands/base_command_request.cc b/src/components/remote_control/src/commands/base_command_request.cc index c67bd68340..e3b0384e49 100644 --- a/src/components/remote_control/src/commands/base_command_request.cc +++ b/src/components/remote_control/src/commands/base_command_request.cc @@ -365,8 +365,7 @@ bool BaseCommandRequest::CheckPolicyPermissions() { application_manager::TypeAccess BaseCommandRequest::CheckAccess( const Json::Value& message) { const std::string& module = ModuleType(message); - return service_->CheckAccess( - app_->app_id(), module, message_->function_name(), ControlData(message)); + return service_->CheckAccess(app_->app_id(), module); } bool BaseCommandRequest::CheckDriverConsent() { @@ -385,9 +384,6 @@ bool BaseCommandRequest::CheckDriverConsent() { if (IsAutoAllowed(access)) { set_auto_allowed(true); return true; - } - if (IsNeededDriverConsent(access)) { - SendGetUserConsent(value); } else { SendDisallowed(access); } @@ -436,11 +432,6 @@ bool BaseCommandRequest::AqcuireResources() { return false; } -bool BaseCommandRequest::IsNeededDriverConsent( - application_manager::TypeAccess access) const { - return access == application_manager::kManual; -} - bool BaseCommandRequest::IsAutoAllowed( application_manager::TypeAccess access) const { return access == application_manager::kAllowed; @@ -452,7 +443,6 @@ void BaseCommandRequest::SendDisallowed( std::string info; switch (access) { case application_manager::kAllowed: - case application_manager::kManual: return; case application_manager::kDisallowed: info = disallowed_info_.empty() @@ -567,7 +557,6 @@ void BaseCommandRequest::ProcessAccessResponse( "Setting allowed access for " << app_->app_id() << " for " << module); service_->SetAccess(app_->app_id(), module, is_allowed); - CheckHMILevel(application_manager::kManual, is_succeeded); if (is_allowed) { rc_module_.resource_allocation_manager().ForceAcquireResource( @@ -605,20 +594,6 @@ void BaseCommandRequest::CheckHMILevel(application_manager::TypeAccess access, } } break; - case application_manager::kManual: { - if (user_consented) { - if (app_->hmi_level() == mobile_apis::HMILevel::eType::HMI_NONE || - app_->hmi_level() == mobile_apis::HMILevel::eType::HMI_BACKGROUND) { - LOG4CXX_DEBUG(logger_, - "User consented RSDL functionality for " - << app_->name().c_str() - << "; setting LIMITED level."); - service_->ChangeNotifyHMILevel( - app_, mobile_apis::HMILevel::eType::HMI_LIMITED); - } - } - break; - } case application_manager::kDisallowed: case application_manager::kNone: default: diff --git a/src/components/remote_control/test/commands/button_press_request_test.cc b/src/components/remote_control/test/commands/button_press_request_test.cc index 4b74fb333c..4423f8cad8 100644 --- a/src/components/remote_control/test/commands/button_press_request_test.cc +++ b/src/components/remote_control/test/commands/button_press_request_test.cc @@ -199,7 +199,7 @@ TEST_F(ButtonPressRequestTest, application_manager::AppExtensionPtr app_extension; EXPECT_CALL(*mock_app_, AddExtension(_)) .WillOnce(DoAll(SaveArg<0>(&app_extension), Return(true))); - EXPECT_CALL(*mock_service_, CheckAccess(_, _, _, _)) + EXPECT_CALL(*mock_service_, CheckAccess(_, _)) .WillOnce(Return(application_manager::TypeAccess::kAllowed)); EXPECT_CALL(*mock_service_, GetNextCorrelationID()).WillOnce(Return(1)); @@ -255,7 +255,7 @@ TEST_F( application_manager::AppExtensionPtr app_extension; EXPECT_CALL(*mock_app_, AddExtension(_)) .WillOnce(DoAll(SaveArg<0>(&app_extension), Return(true))); - EXPECT_CALL(*mock_service_, CheckAccess(_, _, _, _)) + EXPECT_CALL(*mock_service_, CheckAccess(_, _)) .WillOnce(Return(application_manager::TypeAccess::kAllowed)); EXPECT_CALL(mock_allocation_manager_, IsResourceFree(_)) .WillOnce(Return(true)); diff --git a/src/components/remote_control/test/commands/get_interior_vehicle_data_request_test.cc b/src/components/remote_control/test/commands/get_interior_vehicle_data_request_test.cc index 6bc24273ee..98404b441a 100644 --- a/src/components/remote_control/test/commands/get_interior_vehicle_data_request_test.cc +++ b/src/components/remote_control/test/commands/get_interior_vehicle_data_request_test.cc @@ -164,7 +164,7 @@ TEST_F(GetInteriorVehicleDataRequestTest, application_manager::AppExtensionPtr app_extension; EXPECT_CALL(*mock_app_, AddExtension(_)) .WillOnce(DoAll(SaveArg<0>(&app_extension), Return(true))); - EXPECT_CALL(*mock_service_, CheckAccess(_, _, _, _)) + EXPECT_CALL(*mock_service_, CheckAccess(_, _)) .WillOnce(Return(application_manager::TypeAccess::kAllowed)); EXPECT_CALL(*mock_service_, GetNextCorrelationID()).WillOnce(Return(1)); application_manager::MessagePtr result_msg; diff --git a/src/components/remote_control/test/commands/set_interior_vehicle_data_request_test.cc b/src/components/remote_control/test/commands/set_interior_vehicle_data_request_test.cc index 3f48013324..b8e27a9c42 100644 --- a/src/components/remote_control/test/commands/set_interior_vehicle_data_request_test.cc +++ b/src/components/remote_control/test/commands/set_interior_vehicle_data_request_test.cc @@ -174,7 +174,7 @@ TEST_F(SetInteriorVehicleDataRequestTest, application_manager::AppExtensionPtr app_extension; EXPECT_CALL(*mock_app_, AddExtension(_)) .WillOnce(DoAll(SaveArg<0>(&app_extension), Return(true))); - EXPECT_CALL(*mock_service_, CheckAccess(_, _, _, _)) + EXPECT_CALL(*mock_service_, CheckAccess(_, _)) .WillOnce(Return(application_manager::TypeAccess::kAllowed)); EXPECT_CALL(*mock_service_, GetNextCorrelationID()) .WillOnce(Return(kCorrelationId)); @@ -242,7 +242,7 @@ TEST_F( application_manager::AppExtensionPtr app_extension; EXPECT_CALL(*mock_app_, AddExtension(_)) .WillOnce(DoAll(SaveArg<0>(&app_extension), Return(true))); - EXPECT_CALL(*mock_service_, CheckAccess(_, _, _, _)) + EXPECT_CALL(*mock_service_, CheckAccess(_, _)) .WillOnce(Return(application_manager::TypeAccess::kAllowed)); EXPECT_CALL(*mock_service_, GetNextCorrelationID()) .WillOnce(Return(kCorrelationId)); @@ -312,7 +312,7 @@ TEST_F(SetInteriorVehicleDataRequestTest, application_manager::AppExtensionPtr app_extension; EXPECT_CALL(*mock_app_, AddExtension(_)) .WillOnce(DoAll(SaveArg<0>(&app_extension), Return(true))); - EXPECT_CALL(*mock_service_, CheckAccess(_, _, _, _)) + EXPECT_CALL(*mock_service_, CheckAccess(_, _)) .WillOnce(Return(application_manager::TypeAccess::kAllowed)); EXPECT_CALL(*mock_service_, SendMessageToHMI(_)).Times(0); |