From: Soyoung Kim Date: Tue, 13 Aug 2013 06:57:05 +0000 (+0900) Subject: Fixed package id is empty in callback of package manager. X-Git-Tag: 2.2.1_release~10^2~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4185f3b3dda38f5a30d4b884f7e0f29f279ec56;p=framework%2Fweb%2Fwrt-installer.git Fixed package id is empty in callback of package manager. [Issue#] TTS-1840 [Problem] package is empty in callback of package manager. please check https://bugs.tizendev.org/jira/browse/TTS-1840 [Cause] signal have been sent before setting package id. [Solution] signal is sent after set package id. [SCMRequest] N/A Change-Id: I24763d3ee499d4789e59828892000f0d29ea4d57 --- diff --git a/src/jobs/widget_install/job_widget_install.cpp b/src/jobs/widget_install/job_widget_install.cpp index e746f01..7af1fb0 100644 --- a/src/jobs/widget_install/job_widget_install.cpp +++ b/src/jobs/widget_install/job_widget_install.cpp @@ -173,12 +173,6 @@ 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) { @@ -256,6 +250,12 @@ JobWidgetInstall::JobWidgetInstall( } else { // Installation is not allowed to proceed due to widget update policy LogWarning("Configure installation failed!"); + getInstallerStruct().pkgmgrInterface->sendSignal( + PKGMGR_START_KEY, + PKGMGR_START_INSTALL); + getInstallerStruct().pkgmgrInterface->sendSignal( + PKGMGR_PROGRESS_KEY, + PKGMGR_START_VALUE); AddTask(new InstallerTaskFail(result)); } @@ -313,6 +313,9 @@ ConfigureResult JobWidgetInstall::prepareInstallation( // Configure installation result = ConfigureInstallation(widgetPath, configData, tempDir); + getInstallerStruct().pkgmgrInterface->sendSignal( + PKGMGR_PROGRESS_KEY, + PKGMGR_START_VALUE); } Catch(Exceptions::OpenZipFailed) { @@ -499,6 +502,9 @@ ConfigureResult JobWidgetInstall::ConfigureInstallation( m_installerContext.isUpdateMode = true; } Catch(WidgetDAOReadOnly::Exception::WidgetNotExist) { + getInstallerStruct().pkgmgrInterface->sendSignal( + PKGMGR_START_KEY, + PKGMGR_START_INSTALL); result = ConfigureResult::Ok; m_installerContext.isUpdateMode = false;