diff options
author | Alexander <akutsan@luxoft.com> | 2018-12-17 17:55:33 +0000 |
---|---|---|
committer | igapchuck <igapchuck@luxoft.com> | 2019-07-24 10:26:36 +0300 |
commit | 8e77a09d4c6800e28e2d8693381bb75a0d14c89e (patch) | |
tree | 735ca9cdbc1163a2900b43147c6d358cffbff288 /src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands | |
parent | 4f46c006c75c79adefa6071bbca8d8b3eeb6135a (diff) | |
download | sdl_core-8e77a09d4c6800e28e2d8693381bb75a0d14c89e.tar.gz |
Process lock_screen_dismissal_enabled logic
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands')
-rw-r--r-- | src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_driver_distraction_notification.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_driver_distraction_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_driver_distraction_notification.cc index 2f3ee60a16..0e3a66aad7 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_driver_distraction_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/hmi/on_driver_distraction_notification.cc @@ -108,14 +108,12 @@ OnDriverDistractionNotification::~OnDriverDistractionNotification() {} void OnDriverDistractionNotification::Run() { LOG4CXX_AUTO_TRACE(logger_); - const hmi_apis::Common_DriverDistractionState::eType state = + const auto state = static_cast<hmi_apis::Common_DriverDistractionState::eType>( (*message_)[strings::msg_params][hmi_notification::state].asInt()); application_manager_.set_driver_distraction_state(state); - smart_objects::SmartObjectSPtr on_driver_distraction = - std::make_shared<smart_objects::SmartObject>(); - + auto on_driver_distraction = std::make_shared<smart_objects::SmartObject>(); if (!on_driver_distraction) { LOG4CXX_ERROR(logger_, "NULL pointer"); return; @@ -127,6 +125,17 @@ void OnDriverDistractionNotification::Run() { (*on_driver_distraction)[strings::msg_params][mobile_notification::state] = state; + const auto lock_screen_dismissal = + application_manager_.GetPolicyHandler().LockScreenDismissalEnabledState(); + + if (lock_screen_dismissal && + hmi_apis::Common_DriverDistractionState::DD_ON == state) { + (*on_driver_distraction) + [strings::msg_params] + [mobile_notification::lock_screen_dismissal_enabled] = + *lock_screen_dismissal; + } + const ApplicationSet applications = application_manager_.applications().GetData(); |