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

Change-Id: I75a3300b4449e42758b6e99e027bcf0a2227431c
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/common/step/configuration/step_parse_manifest.cc

index 3b4b368..2bf1007 100644 (file)
@@ -461,8 +461,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());
@@ -530,7 +532,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");
@@ -603,7 +608,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());
@@ -706,7 +714,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");