Fix bugs about boot sequence parser plugin 69/295369/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 6 Jul 2023 06:57:18 +0000 (15:57 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 6 Jul 2023 06:57:18 +0000 (15:57 +0900)
The condition of if statements are wrong. If the value is not 'true' or 'false',
the parser plugin should set the default value.

Change-Id: I41b44aa90779d4bc74711d955ce9fcdea03264a1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
parser/boot-sequencer/parser_plugin.cc

index d6149fa..641e34a 100644 (file)
@@ -350,13 +350,11 @@ void ParserPlugin::ParseBootSequence(xmlNode* node, AppInfo* app_info) {
     }
   }
 
-  if (app_info->GetBackgroundLaunch().empty() ||
-      app_info->GetBackgroundLaunch() != "true" ||
+  if (app_info->GetBackgroundLaunch() != "true" &&
       app_info->GetBackgroundLaunch() != "false")
     app_info->SetBackgroundLaunch("true");
 
-  if (app_info->GetWaitUntilReady().empty() ||
-      app_info->GetWaitUntilReady() != "true" ||
+  if (app_info->GetWaitUntilReady() != "true" &&
       app_info->GetWaitUntilReady() != "false")
     app_info->SetWaitUntilReady("true");