Change the logic of parsing light-user element 56/325556/1 tizen
authorIlho Kim <ilho159.kim@samsung.com>
Thu, 12 Jun 2025 00:25:20 +0000 (09:25 +0900)
committerIlho Kim <ilho159.kim@samsung.com>
Thu, 12 Jun 2025 01:15:16 +0000 (10:15 +0900)
| support(manifest) | switch-mode(manifest) | switch-mode(applied) |
|-------------------|-----------------------|----------------------|
|      false        |        (ignored)      |       default        |
|       true        |         alive         |        alive         |
|       true        |       (not alive)     |        kill          |

The case of support and switch-mode value written in maniest are ignored

Change-Id: I02b29c7c64ce726b2683811602a228b1749358f0
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/common/step/configuration/step_parse_manifest.cc

index d2f356d1fa3c43588f75b8c0eb7ed4a760f9276d..3e7e1bcb4af69510d23ef8abc8a2856c95d13518 100644 (file)
@@ -811,8 +811,13 @@ bool StepParseManifest::FillLightUserInfo(manifest_x* manifest) {
     return false;
   }
 
-  manifest->light_user_switch_mode =
-      strdup(light_user_info->switch_mode() == "alive" ? "default" : "kill");
+  if (strcasecmp(light_user_info->support().c_str(), "true") != 0) {
+    manifest->light_user_switch_mode = strdup("default");
+  } else {
+    manifest->light_user_switch_mode = strdup(
+        strcasecmp(light_user_info->switch_mode().c_str(), "alive") == 0 ?
+            "alive" : "kill");
+  }
 
   return true;
 }