-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sdl passenger mode without ut implementation #2792
Sdl passenger mode without ut implementation #2792
Conversation
@@ -127,6 +127,14 @@ void OnDriverDistractionNotification::Run() { | |||
(*on_driver_distraction)[strings::msg_params][mobile_notification::state] = | |||
state; | |||
|
|||
auto lock_screen_dismissal = application_manager_.GetPolicyHandler().LockScreenDismissalEnabledState(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LuxoftAKutsan can be const
@@ -3387,6 +3387,14 @@ void ApplicationManagerImpl::SendDriverDistractionState( | |||
mobile_api::FunctionID::OnDriverDistractionID; | |||
(*on_driver_distraction)[strings::msg_params][mobile_notification::state] = | |||
driver_distraction_state(); | |||
auto lock_screen_dismissal = policy_handler_->LockScreenDismissalEnabledState(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LuxoftAKutsan can be const
@@ -1600,6 +1600,11 @@ void PolicyHandler::OnSystemReady() { | |||
policy_manager_->OnSystemReady(); | |||
} | |||
|
|||
const utils::OptionalVal<bool> PolicyHandler::LockScreenDismissalEnabledState() const { | |||
POLICY_LIB_CHECK(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LuxoftAKutsan probably return empty Value if policy library not available
@@ -6775,6 +6775,13 @@ | |||
<param name="state" type="DriverDistractionState" mandatory="true"> | |||
<description>Current State of Driver Distraction</description> | |||
</param> | |||
<param name="lockScreenDismissalEnabled" type="Boolean" mandatory="false"> | |||
<description> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LuxoftAKutsan formating of xml should be fixed
@@ -148,6 +148,14 @@ class PolicyManagerImpl : public PolicyManager { | |||
*/ | |||
void KmsChanged(int kilometers) OVERRIDE; | |||
|
|||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LuxoftAKutsan avoid description in overridings of the functions
if (module_config.lock_screen_dismissal_enabled.is_initialized()) { | ||
return utils::OptionalVal<bool>(*module_config.lock_screen_dismissal_enabled); | ||
} | ||
return utils::OptionalVal<bool>(utils::OptionalVal<bool>::EMPTY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LuxoftAKutsan would be better to create initial empty variable and return it in CACHE_MANAGER_CHECK
and outside the if. If it is possible to use this variable inside of, wold be wonderful
@@ -1267,6 +1270,17 @@ bool SQLPTRepresentation::SaveModuleConfig( | |||
: query.Bind(8); | |||
config.certificate.is_initialized() ? query.Bind(9, *(config.certificate)) | |||
: query.Bind(9); | |||
LOG4CXX_WARN(logger_, | |||
"AKUTSAN isi ninted " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LuxoftAKutsan remove debug log
<< config.lock_screen_dismissal_enabled.is_initialized()); | ||
|
||
if (config.lock_screen_dismissal_enabled.is_initialized()) { | ||
LOG4CXX_WARN(logger_, "AKUTSAN bind val"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LuxoftAKutsan remove debug log
LOG4CXX_WARN(logger_, "AKUTSAN bind val"); | ||
query.Bind(10, *(config.lock_screen_dismissal_enabled)); | ||
} else { | ||
LOG4CXX_WARN(logger_, "AKUTSAN bind null"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LuxoftAKutsan remove debug log
@@ -41,6 +41,7 @@ | |||
#include "utils/threads/thread.h" | |||
#include "utils/threads/thread_delegate.h" | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LuxoftAKutsan redundant emptyline
Contains implementation of feature #2134
Do not contains Unit tests for the feature
All scripts from Ford-Luxoft/sdl_atf_test_scripts#1 passed
Feature overview :
Add optional
lockScreenDismissalEnabled
parameter toOnDriverDistraction
notification to mobile.Add
lockScreenDismissalEnabled
parameter to Policy (module_meta
table).In case if
lockScreenDismissalEnabled
is not available in policy table, SDL should not addlockScreenDismissalEnabled
parameter toOnDriverDistraction
notification to mobile.In case if
lockScreenDismissalEnabled
is available in policy table, SDL should add it toOnDriverDistraction
notification to mobile.In case if SDL received OnDriverDistraction with
DriverDistractionState
=DD_OFF
, SDL should not addlockScreenDismissalEnabled
toOnDriverDistraction
notification to mobile.