Fixed csc web app's preload attribute.
authorSoyoung Kim <sy037.kim@samsung.com>
Mon, 9 Sep 2013 08:32:27 +0000 (17:32 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Thu, 12 Sep 2013 05:32:48 +0000 (05:32 +0000)
[Issue#] N/A
[Problem] The web app installed by csc display download app at setting menu.
[Cause] preload attribute doesn't set if installed by csc.
[Solution] set preload attribute if installed csc.
[SCMRequest] N/A

Change-Id: I3a3490511ecd86b2a604e75ef231d053ef85a6e5

src/commons/wrt_install_mode.h
src/jobs/widget_install/task_pkg_info_update.cpp
src/wrt-installer/wrt-installer.cpp

index 19a387e..714d3c3 100644 (file)
@@ -49,7 +49,8 @@ class InstallMode
     enum class InstallTime
     {
         NORMAL,
-        PRELOAD
+        CSC,
+        PRELOAD,
     };
 
     InstallMode(Command cmd = Command::INSTALL,
index 807117f..05be902 100644 (file)
@@ -66,11 +66,14 @@ void TaskPkgInfoUpdate::StepPkgInfo()
     int code = 0;
     char* updateTags[3] = {NULL, };
 
-    if (!m_context.mode.removable) {
-        updateTags[0] = "preload=false";
-        updateTags[1] = "removable=false";
+    if (InstallMode::InstallTime::CSC == m_context.mode.installTime) {
+        updateTags[0] = "preload=true";
+        if (m_context.mode.removable) {
+            updateTags[1] = "removable=true";
+        } else {
+            updateTags[1] = "removable=false";
+        }
         updateTags[2] = NULL;
-
     }
 
     if (m_context.mode.rootPath == InstallMode::RootPath::RO) {
index 08f0d60..30295d0 100644 (file)
@@ -190,6 +190,7 @@ void WrtInstaller::OnCreate()
             if (m_argc != 3) {
                 return showHelpAndQuit();
             }
+            m_installMode.installTime = InstallMode::InstallTime::CSC;
             std::string configuration = m_argv[2];
             m_CSCconfigurationMap = parseCSCConfiguration(configuration);