summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrey Oleynik <aoleynik@luxoft.com>2016-07-08 12:29:46 +0300
committerAndrey Oleynik <aoleynik@luxoft.com>2016-07-08 16:38:37 +0300
commit383cbfdfdc8f42051f05575cdc93654548b97297 (patch)
treec850065d38fc617b4a86b7acf5aabb7a5d14c29d /src
parentd738f0de8d66c43d549f57e865f13f235fb711d8 (diff)
downloadsdl_core-383cbfdfdc8f42051f05575cdc93654548b97297.tar.gz
Fixes saving of default assigned policy
On assigning of default policy to application there were no saving of RequestTypes and AppHMIType parameters. Relates-to: APPLINK-25284
Diffstat (limited to 'src')
-rw-r--r--src/components/policy/src/sql_pt_representation.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/components/policy/src/sql_pt_representation.cc b/src/components/policy/src/sql_pt_representation.cc
index 8cdb3c9448..ab9afa9923 100644
--- a/src/components/policy/src/sql_pt_representation.cc
+++ b/src/components/policy/src/sql_pt_representation.cc
@@ -1563,11 +1563,21 @@ bool SQLPTRepresentation::SetDefaultPolicy(const std::string& app_id) {
SetPreloaded(false);
policy_table::Strings default_groups;
- if (GatherAppGroup(kDefaultId, &default_groups) &&
- SaveAppGroup(app_id, default_groups)) {
- return SetIsDefault(app_id, true);
+ if (!GatherAppGroup(kDefaultId, &default_groups) ||
+ !SaveAppGroup(app_id, default_groups)) {
+ return false;
}
- return false;
+ policy_table::RequestTypes request_types;
+ if (!GatherRequestType(kDefaultId, &request_types) ||
+ !SaveRequestType(app_id, request_types)) {
+ return false;
+ }
+ policy_table::AppHMITypes app_types;
+ if (!GatherAppType(kDefaultId, &app_types) ||
+ !SaveAppType(app_id, app_types)) {
+ return false;
+ }
+ return SetIsDefault(app_id, true);
}
bool SQLPTRepresentation::SetIsDefault(const std::string& app_id,