Add invalid wgt package exception code
authorsung-su.kim <sung-su.kim@samsung.com>
Thu, 18 Jul 2013 01:46:44 +0000 (10:46 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Thu, 25 Jul 2013 02:45:18 +0000 (02:45 +0000)
[Issue#] N/A
[Problem] N/A
[Cause] N/A
[Solution] Add invalid wgt package exception code
[SCMRequest] N/A

Change-Id: I73965ae534e2e7a4f7c00ac5659e4da66faefb88

src/jobs/widget_install/job_widget_install.cpp
src/pkg-manager/pkgmgr_signal.cpp
src/pkg-manager/pkgmgr_signal.h

index d830e06..99d102d 100644 (file)
@@ -173,6 +173,12 @@ JobWidgetInstall::JobWidgetInstall(
     m_exceptionCaught(Jobs::Exceptions::Success)
 {
     m_installerContext.mode = m_jobStruct.m_installMode;
+    getInstallerStruct().pkgmgrInterface->sendSignal(
+        PKGMGR_START_KEY,
+        PKGMGR_START_INSTALL);
+    getInstallerStruct().pkgmgrInterface->sendSignal(
+        PKGMGR_PROGRESS_KEY,
+        PKGMGR_START_VALUE);
     ConfigureResult result = prepareInstallation(widgetPath);
 
     if (result == ConfigureResult::Ok) {
@@ -260,7 +266,6 @@ ConfigureResult JobWidgetInstall::prepareInstallation(
 {
     ConfigureResult result;
     m_needEncryption = false;
-
     Try
     {
         std::string tempDir;
@@ -495,9 +500,6 @@ ConfigureResult JobWidgetInstall::ConfigureInstallation(
     }
     Catch(WidgetDAOReadOnly::Exception::WidgetNotExist) {
         result = ConfigureResult::Ok;
-        getInstallerStruct().pkgmgrInterface->sendSignal(
-                PKGMGR_START_KEY,
-                PKGMGR_START_INSTALL);
         m_installerContext.isUpdateMode = false;
 
         if (!validateTizenApplicationID(
index 9082d23..f0cd371 100644 (file)
@@ -120,7 +120,7 @@ bool PkgmgrSignal::sendSignal(const std::string& key,
         return false;
     }
 
-    if (m_handle == NULL || m_type.empty() || m_pkgname.empty()) {
+    if (m_handle == NULL || m_type.empty()) {
         LogError("Some data of PkgmgrSignal is empty");
         return false;
     }
index 3a75f82..410459e 100644 (file)
@@ -38,6 +38,7 @@ namespace PackageManager {
 #define PKGMGR_PROGRESS_KEY         "install_percent"
 #define PKGMGR_ICON_PATH            "icon_path"
 #define PKGMGR_ERROR                "error"
+#define PKGMGR_START_VALUE          "0"
 
 typedef pkgmgr_installer* PkgmgrHandle;