Fixed update signal
authorSoyoung Kim <sy037.kim@samsung.com>
Tue, 12 Feb 2013 11:11:45 +0000 (20:11 +0900)
committerGerrit Code Review <gerrit2@kim11>
Wed, 13 Feb 2013 04:59:14 +0000 (13:59 +0900)
[Issue#] N/A
[Problem] when update process failed, icon is delete at menu-screen.
[Cause] installer doesn't send update signal before update process.
[Solution] add update signal.
[SCMRequest] N/A

Change-Id: I9beea36d872e29d77772cf48e484fc9bbce121a0

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

index f8dc52d..3e80871 100644 (file)
@@ -428,10 +428,6 @@ void JobWidgetInstall::setTizenId(
                                                          m_installerContext.
                                                              widgetConfig.
                                                              tzAppid));
-    getInstallerStruct().pkgmgrInterface->sendSignal(
-        PKGMGR_START_KEY,
-        PKGMGR_START_INSTALL);
-
     LogInfo("Tizen App Id : " << m_installerContext.widgetConfig.tzAppid);
     LogInfo("Tizen Pkg Id : " << m_installerContext.widgetConfig.tzPkgid);
     LogInfo("W3C Widget GUID : " << m_installerContext.widgetConfig.guid);
@@ -515,10 +511,19 @@ JobWidgetInstall::ConfigureResult JobWidgetInstall::checkWidgetUpdate(
     if (update.existingWidgetInfo.isExist == false) {
         LogInfo("Widget info does not exist");
         updateTypeCheckBit = WidgetUpdateMode::NotInstalled;
+
+        getInstallerStruct().pkgmgrInterface->sendSignal(
+                PKGMGR_START_KEY,
+                PKGMGR_START_INSTALL);
+
     } else {
         LogInfo("Widget info exists. appid: " <<
                 update.existingWidgetInfo.tzAppid);
 
+        getInstallerStruct().pkgmgrInterface->sendSignal(
+                PKGMGR_START_KEY,
+                PKGMGR_START_UPDATE);
+
         TizenAppId tzAppid = update.existingWidgetInfo.tzAppid;
 
         LogInfo("Widget model exists. tizen app id: " << tzAppid);
index 638e593..f5fecd7 100644 (file)
@@ -30,6 +30,7 @@ namespace PackageManager {
 #define PKGMGR_WEBAPP_TYPE          "wgt"
 #define PKGMGR_START_KEY            "start"
 #define PKGMGR_START_INSTALL        "install"
+#define PKGMGR_START_UPDATE         "update"
 #define PKGMGR_START_UNINSTALL      "uninstall"
 #define PKGMGR_END_KEY              "end"
 #define PKGMGR_END_SUCCESS          "ok"