#include <widget_install/task_prelaunching_registration.h>
#endif
#include <widget_install_to_external.h>
-#include <boost/optional/optional_io.hpp>
#include <boost/filesystem.hpp>
#include <dpl/log/secure_log.h>
std::ostringstream out;
WidgetLocalizedInfo localizedInfo =
W3CFileLocalization::getLocalizedInfo(dao.getTizenAppId());
- WidgetSize size = dao.getPreferredSize();
- DPL::OptionalString startFile =
- W3CFileLocalization::getStartFile(dao.getTizenAppId());
out << std::endl <<
"===================================== INSTALLED WIDGET INFO =========" \
"============================";
- if (!!(localizedInfo.name))
- out << std::endl << "Name: " << *(localizedInfo.name);
- else
- out << std::endl << "Name: " << "--";
- out << std::endl << "AppId: " << dao.getTizenAppId();
+ out << std::endl << "Name: " << localizedInfo.name;
+ out << std::endl << "AppId: " << dao.getTizenAppId();
+ WidgetSize size = dao.getPreferredSize();
out << std::endl << "Width: " << size.width;
out << std::endl << "Height: " << size.height;
- if (!!(startFile))
- out << std::endl << "Start File: " << *(startFile);
- else
- out << std::endl << "Start File: " << "--";
- if (!!(dao.getVersion()))
- out << std::endl << "Version: " << *(dao.getVersion());
- else
- out << std::endl << "Version: " << "--";
- if (!!(localizedInfo.license))
- out << std::endl << "Licence: " << *(localizedInfo.license);
- else
- out << std::endl << "Licence: " << "--";
- if (!!(localizedInfo.licenseHref))
- out << std::endl << "Licence Href: " << *(localizedInfo.licenseHref);
- else
- out << std::endl << "Licence Href: " << "--";
- if (!!(localizedInfo.description))
- out << std::endl << "Description: " << *(localizedInfo.description);
- else
- out << std::endl << "Description: " << "--";
- if (!!(dao.getGUID()))
- out << std::endl << "Widget Id: " << *(dao.getGUID());
- else
- out << std::endl << "Widget Id: " << "--";
-
- OptionalWidgetIcon icon = W3CFileLocalization::getIcon(dao.getTizenAppId());
+ out << std::endl << "Start File: " <<
+ W3CFileLocalization::getStartFile(dao.getTizenAppId());
+ out << std::endl << "Version: " << dao.getVersion();
+ out << std::endl << "Licence: " <<
+ localizedInfo.license;
+ out << std::endl << "Licence Href: " <<
+ localizedInfo.licenseHref;
+ out << std::endl << "Description: " <<
+ localizedInfo.description;
+ out << std::endl << "Widget Id: " << dao.getGUID();
+
+ OptionalWidgetIcon icon = W3CFileLocalization::getIcon(dao.getTizenAppId());
DPL::OptionalString iconSrc =
!!icon ? icon->src : DPL::OptionalString();
- if (!!(iconSrc))
- out << std::endl << "Icon: " << *(iconSrc);
- else
- out << std::endl << "Icon: " << "--";
+ out << std::endl << "Icon: " << iconSrc;
out << std::endl << "Preferences:";
{
{
out << std::endl << " Key: " <<
it->key_name;
- out << std::endl << " Readonly: " <<
+ out << std::endl << " Readonly: " <<
it->readonly;
}
}
{
_D("StepRemoveInstallationDirectory started");
Try {
- // In some case, app2ext fail to uninstall(remove directory) because of mount issue.
- bool removed = false;
-
int ret = app2ext_get_app_location(m_context.tzPkgid.c_str());
// app2ext remove /opt/usr/apps[pkdid] directory in post_uninstall() function.
WidgetInstallToExtSingleton::Instance().initialize(m_context.tzPkgid);
WidgetInstallToExtSingleton::Instance().uninstallation();
WidgetInstallToExtSingleton::Instance().deinitialize();
- removed = true;
}
Catch(WidgetInstallToExt::Exception::ErrorInstallToExt)
{
// i.e.) SD card isn't inserted or unmounted.
// This behavior is recommended by platform(app2sd maintainer).
_E("Fail to remove external directory");
+ ThrowMsg(Exceptions::RemoveFileFailure, "Cann't remove external directory");
}
- }
-
- // If fail to remove directory in the app2ext retry remove directroy with below code.
- if (!removed && APP2EXT_NOT_INSTALLED != ret) {
+ } else if (APP2EXT_NOT_INSTALLED != ret) {
_D("Removing directory");
std::string userAppsPath = WrtDB::GlobalConfig::GetUserInstalledWidgetPath();