From 24b50cd7fd9bc9b57d4aa0898ac82faa6b7f8bcc Mon Sep 17 00:00:00 2001 From: "sung-su.kim" Date: Thu, 18 Jul 2013 10:46:44 +0900 Subject: [PATCH] Add invalid wgt package exception code [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 | 10 ++++++---- src/pkg-manager/pkgmgr_signal.cpp | 2 +- src/pkg-manager/pkgmgr_signal.h | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/jobs/widget_install/job_widget_install.cpp b/src/jobs/widget_install/job_widget_install.cpp index d830e06..99d102d 100644 --- a/src/jobs/widget_install/job_widget_install.cpp +++ b/src/jobs/widget_install/job_widget_install.cpp @@ -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( diff --git a/src/pkg-manager/pkgmgr_signal.cpp b/src/pkg-manager/pkgmgr_signal.cpp index 9082d23..f0cd371 100644 --- a/src/pkg-manager/pkgmgr_signal.cpp +++ b/src/pkg-manager/pkgmgr_signal.cpp @@ -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; } diff --git a/src/pkg-manager/pkgmgr_signal.h b/src/pkg-manager/pkgmgr_signal.h index 3a75f82..410459e 100644 --- a/src/pkg-manager/pkgmgr_signal.h +++ b/src/pkg-manager/pkgmgr_signal.h @@ -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; -- 2.7.4