From: Junghyun Yeon Date: Thu, 21 Apr 2022 07:40:32 +0000 (+0900) Subject: Implement lightuser feature X-Git-Tag: accepted/tizen/unified/20220425.055050~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F98%2F274098%2F1;p=platform%2Fcore%2Fappfw%2Fwgt-backend.git Implement lightuser feature Change-Id: Ic0d3223a51e147ad7f6eb1292decc2b4d50e68c6 Signed-off-by: Junghyun Yeon --- diff --git a/src/wgt/step/configuration/step_parse.cc b/src/wgt/step/configuration/step_parse.cc index c7d17e6..f9e1615 100644 --- a/src/wgt/step/configuration/step_parse.cc +++ b/src/wgt/step/configuration/step_parse.cc @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -858,8 +859,22 @@ bool StepParse::FillImeInfo() { return true; } +bool StepParse::FillLightUserInfo(manifest_x* manifest) { + auto lightuser_info = GetManifestDataForKey< + const wgt::parse::LightUserInfo>(app_keys::kTizenLightUserKey); + if (!lightuser_info) { + manifest->light_user_switch_mode = strdup("default"); + return true; + } + + manifest->light_user_switch_mode = strdup( + lightuser_info->switch_mode().c_str()); + + return true; +} + bool StepParse::FillExtraManifestInfo(manifest_x* manifest) { - return FillAccounts(manifest) && FillImeInfo() && FillAppWidget(); + return FillAccounts(manifest) && FillImeInfo() && FillAppWidget() && FillLightUserInfo(manifest); } bool StepParse::FillManifestX(manifest_x* manifest) { diff --git a/src/wgt/step/configuration/step_parse.h b/src/wgt/step/configuration/step_parse.h index 0480048..ddf6b7e 100644 --- a/src/wgt/step/configuration/step_parse.h +++ b/src/wgt/step/configuration/step_parse.h @@ -77,6 +77,7 @@ class StepParse : public common_installer::Step { bool FillAdditionalApplications(manifest_x* manifest); bool FillManifestX(manifest_x* manifest); bool FillTrustAnchorInfo(manifest_x* manifest); + bool FillLightUserInfo(manifest_x* manifest); std::unique_ptr parser_; ConfigLocation config_location_;