diff options
-rw-r--r-- | src/components/application_manager/src/commands/mobile/register_app_interface_request.cc | 8 | ||||
-rw-r--r-- | src/components/interfaces/HMI_API.xml | 20 | ||||
-rw-r--r-- | src/components/interfaces/MOBILE_API.xml | 27 | ||||
-rw-r--r-- | src/components/interfaces/QT_HMI_API.xml | 31 | ||||
-rw-r--r-- | src/components/policy/src/policy/src/cache_manager.cc | 48 | ||||
-rw-r--r-- | src/components/utils/CMakeLists.txt | 3 |
6 files changed, 84 insertions, 53 deletions
diff --git a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc b/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc index 8f0f7581f7..2cf80d8b0c 100644 --- a/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc +++ b/src/components/application_manager/src/commands/mobile/register_app_interface_request.cc @@ -1,4 +1,4 @@ -/* +/* Copyright (c) 2013, Ford Motor Company All rights reserved. @@ -561,7 +561,7 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckWithPolicyData() { // TODO(AOleynik): Check is necessary to allow register application in case // of disabled policy // Remove this check, when HMI will support policy - if (policy::PolicyHandler::instance()->PolicyEnabled()) { + if (!policy::PolicyHandler::instance()->PolicyEnabled()) { return mobile_apis::Result::WARNINGS; } @@ -569,10 +569,6 @@ mobile_apis::Result::eType RegisterAppInterfaceRequest::CheckWithPolicyData() { policy::StringArray app_nicknames; policy::StringArray app_hmi_types; - if(!policy::PolicyHandler::instance()->PolicyEnabled()) { - return mobile_apis::Result::WARNINGS; - } - // TODO(KKolodiy): need remove method policy_manager policy::PolicyManager* policy_manager = policy::PolicyHandler::instance()->policy_manager(); diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml index 4ad1bfff27..72e29faa29 100644 --- a/src/components/interfaces/HMI_API.xml +++ b/src/components/interfaces/HMI_API.xml @@ -427,9 +427,6 @@ <element name="totalDistance"> <description> Total distance to destination for navigation</description> </element> - <element name="navigationText"> - <description>Navigation text for UpdateTurnList.</description> - </element> <element name="audioPassThruDisplayText1"> <description> First line of text for audio pass thru</description> </element> @@ -442,9 +439,6 @@ <element name="sliderFooter"> <description> Footer text for slider</description> </element> - <element name="notificationText"> - <description>Text of notification to be displayed on screen.</description> - </element> <element name="menuName"> <description> Primary text for Choice</description> </element> @@ -458,14 +452,17 @@ <description> Optional text to label an app menu button (for certain touchscreen platforms).</description> </element> <element name="timeToDestination"/> - <!-- TO DO to be removed --> + <element name="navigationText"> + <description>Navigation text for UpdateTurnList.</description> + </element> + <element name="notificationText"> + <description>Text of notification to be displayed on screen.</description> + </element> + <!-- TO DO to be removed --> <element name="turnText"/> </enum> <enum name="ImageFieldName"> - <element name="locationImage"> - <description>The optional image of a destination / location</description> - </element> <element name="softButtonImage"> <description>The image field for SoftButton</description> </element> @@ -499,6 +496,9 @@ <element name="showConstantTBTNextTurnIcon"> <description>The secondary image field for ShowConstantTBT</description> </element> + <element name="locationImage"> + <description>The optional image of a destination / location</description> + </element> </enum> <enum name="TextAlignment"> diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml index 005bff5821..4580edd940 100644 --- a/src/components/interfaces/MOBILE_API.xml +++ b/src/components/interfaces/MOBILE_API.xml @@ -642,11 +642,7 @@ <element name="sliderFooter"> <description> Footer text for slider</description> </element> - - <element name="notificationText"> - <description> Footer text for slider</description> - </element> - + <element name="menuName"> <description> Primary text for Choice</description> </element> @@ -658,20 +654,29 @@ <element name="tertiaryText"> <description> Tertiary text for Choice</description> </element> - + + <element name="menuTitle"> + <description> Optional text to label an app menu button (for certain touchscreen platforms).</description> + </element> + <element name="timeToDestination"> <description> Time to destination</description> </element> + <element name="navigationText"> + <description>Navigation text for UpdateTurnList.</description> + </element> + + <element name="notificationText"> + <description> Footer text for slider</description> + </element> + <element name="turnText"> <description> Turn text</description> </element> - <element name="menuTitle"> - <description> Optional text to label an app menu button (for certain touchscreen platforms).</description> - </element> -</enum> - + </enum> + <enum name="ImageFieldName"> <element name="softButtonImage"> <description>The image field for SoftButton</description> diff --git a/src/components/interfaces/QT_HMI_API.xml b/src/components/interfaces/QT_HMI_API.xml index 3f6d08b69b..ff62fed7f7 100644 --- a/src/components/interfaces/QT_HMI_API.xml +++ b/src/components/interfaces/QT_HMI_API.xml @@ -347,12 +347,11 @@ <element name="STATIC"/> <element name="DYNAMIC"/> </enum> -<enum name="ApplicationToNONEReason"> - <description>Describes the reasons of moving the app to NONE.</description> - <element name="DRIVER_DISTRACTION_VIOLATION" /> - <element name="USER_EXIT" /> -</enum> - + <enum name="ApplicationToNONEReason"> + <description>Describes the reasons of moving the app to NONE.</description> + <element name="DRIVER_DISTRACTION_VIOLATION" /> + <element name="USER_EXIT" /> + </enum> <enum name="TextFieldName"> <element name="mainField1"> <description>The first line of first set of main fields of the persistent display; applies to "Show"</description> @@ -402,9 +401,6 @@ <element name="totalDistance"> <description> Total distance to destination for navigation</description> </element> - <element name="navigationText"> - <description>Navigation text for UpdateTurnList.</description> - </element> <element name="audioPassThruDisplayText1"> <description> First line of text for audio pass thru</description> </element> @@ -417,9 +413,6 @@ <element name="sliderFooter"> <description> Footer text for slider</description> </element> - <element name="notificationText"> - <description>Text of notification to be displayed on screen.</description> - </element> <element name="menuName"> <description> Primary text for Choice</description> </element> @@ -433,13 +426,16 @@ <description> Optional text to label an app menu button (for certain touchscreen platforms).</description> </element> <element name="timeToDestination"/> - <!-- TO DO to be removed --> + <element name="navigationText"> + <description>Navigation text for UpdateTurnList.</description> + </element> + <element name="notificationText"> + <description>Text of notification to be displayed on screen.</description> + </element> + <!-- TO DO to be removed --> <element name="turnText"/> </enum> <enum name="ImageFieldName"> - <element name="locationImage"> - <description>The optional image of a destination / location</description> - </element> <element name="softButtonImage"> <description>The image field for SoftButton</description> </element> @@ -473,6 +469,9 @@ <element name="showConstantTBTNextTurnIcon"> <description>The secondary image field for ShowConstantTBT</description> </element> + <element name="locationImage"> + <description>The optional image of a destination / location</description> + </element> </enum> <enum name="TextAlignment"> <description>The list of possible alignments, left, right, or centered</description> diff --git a/src/components/policy/src/policy/src/cache_manager.cc b/src/components/policy/src/policy/src/cache_manager.cc index 7f5eb14913..a71cd57579 100644 --- a/src/components/policy/src/policy/src/cache_manager.cc +++ b/src/components/policy/src/policy/src/cache_manager.cc @@ -806,22 +806,50 @@ bool CacheManager::CountUnconsentedGroups(const std::string& policy_app_id, const std::string& device_id, int& result) { LOG4CXX_TRACE_ENTER(logger_); -#ifdef EXTENDED_POLICY - policy_table::DeviceParams& params = (*pt_->policy_table.device_data)[device_id]; - policy_table::UserConsentRecords& ucr = *(params.user_consent_records); - policy_table::ConsentRecords cgr = ucr[policy_app_id]; +#ifdef EXTENDED_POLICY + if (pt_->policy_table.app_policies.end() == + pt_->policy_table.app_policies.find(policy_app_id)) { + return true; + } else if (is_default_.end() != is_default_.find(policy_app_id) || + is_predata_.end() != is_predata_.find(policy_app_id)) { + return true; + } - policy_table::ConsentGroups::const_iterator con_iter = - cgr.consent_groups->begin(); policy_table::FunctionalGroupings::const_iterator groups_iter = pt_->policy_table.functional_groupings.begin(); policy_table::FunctionalGroupings::const_iterator groups_iter_end = pt_->policy_table.functional_groupings.end(); - for (; groups_iter != groups_iter_end; ++groups_iter) { - con_iter = cgr.consent_groups->find((*groups_iter).first); - if (con_iter != cgr.consent_groups->end()) { - ++result; + + policy_table::Strings::const_iterator app_spec_iter = + pt_->policy_table.app_policies[policy_app_id].groups.begin(); + + policy_table::Strings::const_iterator app_spec_iter_end = + pt_->policy_table.app_policies[policy_app_id].groups.end(); + + policy_table::FunctionalGroupings::iterator current_groups_iter; + for (; app_spec_iter != app_spec_iter_end; ++app_spec_iter) { + current_groups_iter = pt_->policy_table.functional_groupings.find(*app_spec_iter); + if (groups_iter_end != current_groups_iter) { + if (current_groups_iter->second.user_consent_prompt.is_initialized()) { + if (pt_->policy_table.device_data->end() != + pt_->policy_table.device_data->find(device_id)) { + + policy_table::DeviceParams& params = (*pt_->policy_table.device_data)[device_id]; + policy_table::UserConsentRecords& ucr = *(params.user_consent_records); + + if (ucr.end() != ucr.find(policy_app_id)) { + policy_table::ConsentRecords cgr = ucr[policy_app_id]; + policy_table::ConsentGroups::const_iterator con_iter = + cgr.consent_groups->begin(); + + con_iter = cgr.consent_groups->find((*groups_iter).first); + if (con_iter != cgr.consent_groups->end()) { + ++result; + } + } + } + } } } #endif // EXTENDED_POLICY diff --git a/src/components/utils/CMakeLists.txt b/src/components/utils/CMakeLists.txt index aa5db38104..c52cd09838 100644 --- a/src/components/utils/CMakeLists.txt +++ b/src/components/utils/CMakeLists.txt @@ -44,3 +44,6 @@ if(ENABLE_LOG) target_link_libraries("Utils" log4cxx -L${LOG4CXX_LIBS_DIRECTORY}) endif() +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + target_link_libraries("Utils" pthread) +endif() |