From 3ed05bb3347632edb9ec4a74ccbf42e0d4370664 Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Thu, 21 Apr 2022 16:40:32 +0900 Subject: [PATCH] Implement lightuser feature Change-Id: Ic0d3223a51e147ad7f6eb1292decc2b4d50e68c6 Signed-off-by: Junghyun Yeon --- src/wgt/step/configuration/step_parse.cc | 17 ++++++++++++++++- src/wgt/step/configuration/step_parse.h | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) 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_; -- 2.7.4