From 7b0111af5cc27726eb70d47271a6b64b7bad9b24 Mon Sep 17 00:00:00 2001 From: Duyoung Jang Date: Mon, 12 Aug 2013 13:46:44 +0900 Subject: [PATCH] Add event for storage full Change-Id: I8c81352a2586731a451646c48a83e64f3b3313f0 Signed-off-by: Duyoung Jang --- src/app/package/FAppPkg_PackageManagerImpl.cpp | 33 ++++++++++++++++++++------ 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/src/app/package/FAppPkg_PackageManagerImpl.cpp b/src/app/package/FAppPkg_PackageManagerImpl.cpp index 09ef6be..39cac0d 100755 --- a/src/app/package/FAppPkg_PackageManagerImpl.cpp +++ b/src/app/package/FAppPkg_PackageManagerImpl.cpp @@ -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) { -- 2.7.4