Add event for storage full
authorDuyoung Jang <duyoung.jang@samsung.com>
Mon, 12 Aug 2013 04:46:44 +0000 (13:46 +0900)
committerDuyoung Jang <duyoung.jang@samsung.com>
Mon, 12 Aug 2013 05:01:27 +0000 (14:01 +0900)
Change-Id: I8c81352a2586731a451646c48a83e64f3b3313f0
Signed-off-by: Duyoung Jang <duyoung.jang@samsung.com>
src/app/package/FAppPkg_PackageManagerImpl.cpp

index 09ef6be..39cac0d 100755 (executable)
@@ -88,15 +88,26 @@ _PackageManagerEvent::FireImpl(IEventListener& listener, const IEventArg& arg)
                }
                else
                {
-                       if (pArg->__install)
+                       if (pArg->__install == false)
                        {
-                               SysLog(NID_APP, "Installation is Completed(Error). [Package = %ls]", pArg->__packageId.GetPointer());
-                               pListener->OnPackageInstallationCompleted(pArg->__packageId, PACKAGE_INSTALLATION_RESULT_INVALID_PACKAGE);
+                               SysLog(NID_APP, "Uninstallation is Completed(Error). [Package = %ls]", pArg->__packageId.GetPointer());
+                               pListener->OnPackageUninstallationCompleted(pArg->__packageId, false);
+                       }
+               }
+       }
+       else if (pArg->__eventKey == L"error")
+       {
+               if (pArg->__install)
+               {
+                       if (pArg->__eventValue == L"62")
+                       {
+                               SysLog(NID_APP, "Installation is Completed(Error = STORAGE_FULL(62)). [Package = %ls]", pArg->__packageId.GetPointer());
+                               pListener->OnPackageInstallationCompleted(pArg->__packageId, PACKAGE_INSTALLATION_RESULT_STORAGE_FULL);
                        }
                        else
                        {
-                               SysLog(NID_APP, "Uninstallation is Completed(Error). [Package = %ls]", pArg->__packageId.GetPointer());
-                               pListener->OnPackageUninstallationCompleted(pArg->__packageId, false);
+                               SysLog(NID_APP, "Installation is Completed(Error). [Package = %ls]", pArg->__packageId.GetPointer());
+                               pListener->OnPackageInstallationCompleted(pArg->__packageId, PACKAGE_INSTALLATION_RESULT_INVALID_PACKAGE);
                        }
                }
        }
@@ -668,13 +679,21 @@ _PackageManagerImpl::InstallationEventHandler(int reqId, const char* pType, cons
                                pListener->OnPackageInstallationResponseReceived(pPackageId, PACKAGE_INSTALLATION_RESULT_SUCCESS);
                                SysLog(NID_APP, "OnPackageInstallationResponseReceived(PACKAGE_INSTALLATION_RESULT_SUCCESS)");
                        }
+
+                       delete pListener;
+               }
+               else if (strcmp(pKey, "error") == 0)
+               {
+                       if (strcmp(pVal, "62") == 0)
+                       {
+                               pListener->OnPackageInstallationResponseReceived(pPackageId, PACKAGE_INSTALLATION_RESULT_STORAGE_FULL);
+                               SysLog(NID_APP, "OnPackageInstallationResponseReceived(PACKAGE_INSTALLATION_RESULT_STORAGE_FULL)");
+                       }
                        else
                        {
                                pListener->OnPackageInstallationResponseReceived(pPackageId, PACKAGE_INSTALLATION_RESULT_INVALID_PACKAGE);
                                SysLog(NID_APP, "OnPackageInstallationResponseReceived(PACKAGE_INSTALLATION_RESULT_INVALID_PACKAGE)");
                        }
-
-                       delete pListener;
                }
                else if (strcmp(pKey, "install_percent") == 0)
                {