diff options
author | Andrey Oleynik <aoleynik@luxoft.com> | 2015-07-01 17:26:36 +0300 |
---|---|---|
committer | Andrey Oleynik <my@email.com> | 2015-07-05 16:56:08 +0300 |
commit | b7408cb0252d584d244a2e767a36d491dd3f6c46 (patch) | |
tree | e6c82dad6d13ba17d1de2886ff6e7ee910634cf1 /src/components/application_manager/src/commands | |
parent | 89f3a68b46674e5e88d3da612ea50287b8b317ff (diff) | |
download | sdl_core-b7408cb0252d584d244a2e767a36d491dd3f6c46.tar.gz |
Removes explicit HMI level check within several commands.
Affected commands: GetVehicleData, ReadDID, GetDTC, OnDriverDistraction
Policy table will regulate if request is allowed to run in certain HMI
level instead of explicit check.
Closes-bug: APPLINK-13894, APPLINK-14187
Diffstat (limited to 'src/components/application_manager/src/commands')
4 files changed, 5 insertions, 30 deletions
diff --git a/src/components/application_manager/src/commands/hmi/on_driver_distraction_notification.cc b/src/components/application_manager/src/commands/hmi/on_driver_distraction_notification.cc index fc9dcc6f8e..ceb6e1b586 100644 --- a/src/components/application_manager/src/commands/hmi/on_driver_distraction_notification.cc +++ b/src/components/application_manager/src/commands/hmi/on_driver_distraction_notification.cc @@ -81,11 +81,9 @@ void OnDriverDistractionNotification::Run() { for (; applications.end() != it; ++it) { const ApplicationSharedPtr app = *it; if (app) { - if (mobile_apis::HMILevel::eType::HMI_NONE != app->hmi_level()) { - (*on_driver_distraction)[strings::params] - [strings::connection_key] = app->app_id(); - SendNotificationToMobile(on_driver_distraction); - } + (*on_driver_distraction)[strings::params] + [strings::connection_key] = app->app_id(); + SendNotificationToMobile(on_driver_distraction); } } } diff --git a/src/components/application_manager/src/commands/mobile/get_dtcs_request.cc b/src/components/application_manager/src/commands/mobile/get_dtcs_request.cc index 8e2a0222f7..f6791759a4 100644 --- a/src/components/application_manager/src/commands/mobile/get_dtcs_request.cc +++ b/src/components/application_manager/src/commands/mobile/get_dtcs_request.cc @@ -59,12 +59,6 @@ void GetDTCsRequest::Run() { return; } - if (mobile_api::HMILevel::HMI_NONE == app->hmi_level()) { - LOG4CXX_ERROR(logger_, "App has not been activated"); - SendResponse(false, mobile_apis::Result::REJECTED); - return; - } - smart_objects::SmartObject msg_params = smart_objects::SmartObject( smart_objects::SmartType_Map); diff --git a/src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc b/src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc index 546b14853c..ed75e62c0c 100644 --- a/src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc +++ b/src/components/application_manager/src/commands/mobile/get_vehicle_data_request.cc @@ -65,12 +65,6 @@ void GetVehicleDataRequest::Run() { return; } - if (mobile_api::HMILevel::HMI_NONE == app->hmi_level()) { - LOG4CXX_ERROR(logger_, "app in HMI level HMI_NONE"); - SendResponse(false, mobile_apis::Result::REJECTED); - return; - } - const VehicleData& vehicle_data = MessageHelper::vehicle_data(); VehicleData::const_iterator it = vehicle_data.begin(); @@ -181,7 +175,7 @@ void GetVehicleDataRequest::on_event(const event_engine::Event& event) { } LOG4CXX_TRACE(logger_, "Status from HMI: " << it->status << ", so response status become " << status); } else { - any_arg_success = true; + any_arg_success = true; } } @@ -224,16 +218,11 @@ void GetVehicleDataRequest::Run() { return; } - if (mobile_api::HMILevel::HMI_NONE == app->hmi_level()) { - LOG4CXX_ERROR(logger_, "app in HMI level HMI_NONE."); - SendResponse(false, mobile_apis::Result::REJECTED); - return; - } if (app->IsCommandLimitsExceeded( static_cast<mobile_apis::FunctionID::eType>(function_id()), application_manager::TLimitSource::CONFIG_FILE)) { LOG4CXX_ERROR(logger_, "GetVehicleData frequency is too high."); - SendResponse(false, mobile_apis::Result::REJECTED); + SendResponse(false, mobile_apis::Result::REJECTED); return; } const VehicleData& vehicle_data = MessageHelper::vehicle_data(); diff --git a/src/components/application_manager/src/commands/mobile/read_did_request.cc b/src/components/application_manager/src/commands/mobile/read_did_request.cc index 5a066aab4d..18f43f12ca 100644 --- a/src/components/application_manager/src/commands/mobile/read_did_request.cc +++ b/src/components/application_manager/src/commands/mobile/read_did_request.cc @@ -64,12 +64,6 @@ void ReadDIDRequest::Run() { return; } - if (mobile_api::HMILevel::HMI_NONE == app->hmi_level()) { - SendResponse(false, mobile_apis::Result::REJECTED); - LOG4CXX_ERROR(logger_, "Rejected"); - return; - } - if (app->IsCommandLimitsExceeded( static_cast<mobile_apis::FunctionID::eType>(function_id()), application_manager::TLimitSource::CONFIG_FILE)) { |