Set default type value of app as capp 93/182693/1
authorSangyoon Jang <jeremy.jang@samsung.com>
Mon, 25 Jun 2018 09:09:13 +0000 (18:09 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Wed, 27 Jun 2018 06:49:25 +0000 (06:49 +0000)
Some security module uses type attribute, so it should not be null.

Change-Id: I75a3300b4449e42758b6e99e027bcf0a2227431c
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
(cherry picked from commit 8a97369566d56fdc62b2f30651b3cbe675a5fab0)

src/common/step/configuration/step_parse_manifest.cc

index fcd8f8c..8a762ec 100644 (file)
@@ -463,8 +463,10 @@ bool StepParseManifest::FillWidgetApplication(manifest_x* manifest) {
         strdup((std::to_string(app_support_mode_val)).c_str());
     widget_app->taskmanage = strdup("false");
     widget_app->indicatordisplay = strdup("false");
-    widget_app->type =
-        strdup(application.app_info.type().c_str());
+    if (!application.app_info.type().empty())
+      widget_app->type = strdup(application.app_info.type().c_str());
+    else
+      widget_app->type = strdup("capp");
     widget_app->component_type = strdup("widgetapp");
     widget_app->hwacceleration =
         strdup(application.app_info.hwacceleration().c_str());
@@ -532,7 +534,10 @@ bool StepParseManifest::FillServiceApplication(manifest_x* manifest) {
     service_app->autorestart =
         strdup(application.app_info.auto_restart().c_str());
     service_app->onboot = strdup(application.app_info.on_boot().c_str());
-    service_app->type = strdup(application.app_info.type().c_str());
+    if (!application.app_info.type().empty())
+      service_app->type = strdup(application.app_info.type().c_str());
+    else
+      service_app->type = strdup("capp");
     service_app->process_pool =
         strdup(application.app_info.process_pool().c_str());
     service_app->component_type = strdup("svcapp");
@@ -605,7 +610,10 @@ bool StepParseManifest::FillUIApplication(manifest_x* manifest) {
     ui_app->support_mode =
         strdup((std::to_string(app_support_mode_val)).c_str());
     ui_app->taskmanage = strdup(application.app_info.taskmanage().c_str());
-    ui_app->type = strdup(application.app_info.type().c_str());
+    if (!application.app_info.type().empty())
+      ui_app->type = strdup(application.app_info.type().c_str());
+    else
+      ui_app->type = strdup("capp");
     ui_app->ui_gadget = strdup(application.app_info.uigadget().c_str());
     ui_app->process_pool = strdup(application.app_info.process_pool().c_str());
     ui_app->submode = strdup(application.app_info.submode().c_str());
@@ -708,7 +716,10 @@ bool StepParseManifest::FillWatchApplication(manifest_x* manifest) {
                                watch_application.app_info.exec()).c_str());
     watch_app->nodisplay = strdup("true");
     watch_app->multiple = strdup("false");
-    watch_app->type = strdup(watch_application.app_info.type().c_str());
+    if (!watch_application.app_info.type().empty())
+      watch_app->type = strdup(watch_application.app_info.type().c_str());
+    else
+      watch_app->type = strdup("capp");
     watch_app->taskmanage = strdup("false");
     watch_app->hwacceleration = strdup("default");
     watch_app->screenreader = strdup("use-system-setting");