aboutsummaryrefslogtreecommitdiffstats
path: root/policy_manager
diff options
context:
space:
mode:
Diffstat (limited to 'policy_manager')
-rw-r--r--policy_manager/config/roles.json.zipc.split5
-rw-r--r--policy_manager/policy_manager.cpp16
2 files changed, 19 insertions, 2 deletions
diff --git a/policy_manager/config/roles.json.zipc.split b/policy_manager/config/roles.json.zipc.split
index e21e961..a341d8a 100644
--- a/policy_manager/config/roles.json.zipc.split
+++ b/policy_manager/config/roles.json.zipc.split
@@ -85,14 +85,14 @@
},
{
"category": "general",
- "role": "launcher | poi | browser | mixer | radio | hvac | debug | phone | fallback",
+ "role": "poi | browser | mixer | radio | hvac | debug | phone | fallback",
"area": "normal.full",
"description": "For split test, video and music are moved to category:splitable",
"layer": "apps",
},
{
"category": "system",
- "role": "settings | dashboard",
+ "role": "launcher | settings | dashboard",
"area": "normal.full",
"layer": "apps",
},
@@ -114,6 +114,7 @@
"role": "restriction",
"area": "restriction.normal | restriction.split.main | restriction.split.sub",
"layer": "restriction",
+ "auto_started_roles": "restriction",
},
{
"category": "pop_up",
diff --git a/policy_manager/policy_manager.cpp b/policy_manager/policy_manager.cpp
index 05f2ccb..6a427a5 100644
--- a/policy_manager/policy_manager.cpp
+++ b/policy_manager/policy_manager.cpp
@@ -1079,6 +1079,22 @@ int PolicyManager::loadRolesConfigFile()
this->category2role[category] = std::string(roles);
this->category2areas[category] = vct_areas;
this->layer2categories[layer].push_back(category);
+
+ // TODO: For run-by-default applications, set history in advance
+ const char *auto_started_roles;
+ auto_started_roles = this->getStringFromJson(json_tmp, "auto_started_roles");
+ if (nullptr != auto_started_roles)
+ {
+ std::vector<std::string> vct_auto_started_roles;
+ vct_auto_started_roles =
+ this->parseString(std::string(auto_started_roles), '|');
+
+ for (auto itr = vct_auto_started_roles.end() - 1;
+ itr >= vct_auto_started_roles.begin(); --itr)
+ {
+ this->pushInvisibleRoleHistory(category, *itr);
+ }
+ }
}
// Check