-
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
Changes from all commits
1bab103
8c8eb4d
7765f99
ef78088
ec1d72e
aee9763
6750780
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. @LuxoftAKutsan can be const |
||
|
||
if ( lock_screen_dismissal && | ||
hmi_apis::Common_DriverDistractionState::DD_ON == driver_distraction_state()) { | ||
(*on_driver_distraction)[strings::msg_params] | ||
[mobile_notification::lock_screen_dismissal_enabled] = *lock_screen_dismissal; | ||
} | ||
|
||
(*on_driver_distraction)[strings::params][strings::connection_key] = | ||
application->app_id(); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. @LuxoftAKutsan probably return empty Value if policy library not available |
||
return policy_manager_->LockScreenDismissalEnabledState(); | ||
} | ||
|
||
void PolicyHandler::PTUpdatedAt(Counters counter, int value) { | ||
POLICY_LIB_CHECK_VOID(); | ||
policy_manager_->PTUpdatedAt(counter, value); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. @LuxoftAKutsan formating of xml should be fixed |
||
If enabled, the lock screen will be able to be dismissed while connected to SDL, allowing users | ||
the ability to interact with the app. Dismissals should include a warning to the user and ensure | ||
that they are not the driver. | ||
</description> | ||
</param> | ||
</function> | ||
|
||
<function name="OnPermissionsChange" functionID="OnPermissionsChangeID" messagetype="notification" since="2.0"> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. @LuxoftAKutsan avoid description in overridings of the functions |
||
* @brief Returns state of the lock screen that could be able to be dismissed | ||
* while connected to SDL, allowing users the ability to interact with the | ||
* app. | ||
* @return bool True if lock screen is able to be dismissed. | ||
*/ | ||
const utils::OptionalVal<bool> LockScreenDismissalEnabledState() const OVERRIDE; | ||
|
||
/** | ||
* @brief Increments counter of ignition cycles | ||
*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ | |
|
||
#include "utils/file_system.h" | ||
#include "utils/helpers.h" | ||
|
||
#include "json/reader.h" | ||
#include "json/features.h" | ||
#include "json/writer.h" | ||
|
@@ -1389,6 +1390,16 @@ const policy::VehicleInfo CacheManager::GetVehicleInfo() const { | |
return vehicle_info; | ||
} | ||
|
||
const utils::OptionalVal<bool> CacheManager::LockScreenDismissalEnabledState() const { | ||
CACHE_MANAGER_CHECK(utils::OptionalVal<bool>(utils::OptionalVal<bool>::EMPTY)); | ||
sync_primitives::AutoLock auto_lock(cache_lock_); | ||
policy_table::ModuleConfig& module_config = pt_->policy_table.module_config; | ||
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 commentThe 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 |
||
} | ||
|
||
std::vector<UserFriendlyMessage> CacheManager::GetUserFriendlyMsg( | ||
const std::vector<std::string>& msg_codes, | ||
const std::string& language, | ||
|
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