summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/policies
diff options
context:
space:
mode:
authorAndriy Byzhynar <abyzhynar@luxoft.com>2019-07-10 18:21:27 +0300
committerAndriy Byzhynar (GitHub) <AByzhynar@luxoft.com>2019-08-20 21:17:13 +0300
commit1febd81713ac41bf869d82d7bf8f487306d3621b (patch)
tree5900671aa5fb336ae0d71ecc68539c367de6b46d /src/components/application_manager/src/policies
parent3fa26cf5a0011a241ccb91da1c8a02dcfd75a75f (diff)
downloadsdl_core-1febd81713ac41bf869d82d7bf8f487306d3621b.tar.gz
Update application and its dependencies
Updated application interface and its implementation Updated application state and its implementation Updated Smart object keys
Diffstat (limited to 'src/components/application_manager/src/policies')
-rw-r--r--src/components/application_manager/src/policies/policy_handler.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc
index fdbd0ce391..3db438380a 100644
--- a/src/components/application_manager/src/policies/policy_handler.cc
+++ b/src/components/application_manager/src/policies/policy_handler.cc
@@ -126,7 +126,10 @@ struct HMILevelPredicate
: level_(level) {}
bool operator()(const ApplicationSharedPtr app) const {
- return level_ == app->hmi_level() ? true : false;
+ return level_ == app->hmi_level(
+ mobile_apis::PredefinedWindows::DEFAULT_WINDOW)
+ ? true
+ : false;
}
private:
@@ -967,7 +970,8 @@ void PolicyHandler::OnPendingPermissionChange(
return;
}
- mobile_apis::HMILevel::eType app_hmi_level = app->hmi_level();
+ mobile_apis::HMILevel::eType app_hmi_level =
+ app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
switch (app_hmi_level) {
case mobile_apis::HMILevel::eType::HMI_FULL:
@@ -1357,7 +1361,8 @@ void PolicyHandler::OnPermissionsUpdated(const std::string& device_id,
// The application currently not running (i.e. in NONE) should change HMI
// level to default
- mobile_apis::HMILevel::eType current_hmi_level = app->hmi_level();
+ mobile_apis::HMILevel::eType current_hmi_level =
+ app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW);
mobile_apis::HMILevel::eType hmi_level =
MessageHelper::StringToHMILevel(default_hmi);
@@ -1495,12 +1500,13 @@ bool PolicyHandler::GetPriority(const std::string& policy_app_id,
void PolicyHandler::CheckPermissions(
const application_manager::ApplicationSharedPtr app,
+ const application_manager::WindowID window_id,
const PTString& rpc,
const RPCParams& rpc_params,
CheckPermissionResult& result) {
POLICY_LIB_CHECK_VOID();
const std::string hmi_level =
- MessageHelper::StringifiedHMILevel(app->hmi_level());
+ MessageHelper::StringifiedHMILevel(app->hmi_level(window_id));
if (hmi_level.empty()) {
LOG4CXX_WARN(logger_,
"HMI level for " << app->policy_app_id() << " is invalid, rpc "
@@ -2276,7 +2282,8 @@ void PolicyHandler::UpdateHMILevel(ApplicationSharedPtr app,
mobile_apis::HMILevel::eType level) {
LOG4CXX_AUTO_TRACE(logger_);
DCHECK_OR_RETURN_VOID(app);
- if (app->hmi_level() == mobile_apis::HMILevel::HMI_NONE) {
+ if (app->hmi_level(mobile_apis::PredefinedWindows::DEFAULT_WINDOW) ==
+ mobile_apis::HMILevel::HMI_NONE) {
// If default is FULL, send request to HMI. Notification to mobile will be
// sent on response receiving.
if (mobile_apis::HMILevel::HMI_FULL == level) {