Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(libsmack)
BuildRequires: pkgconfig(efl-assist)
+BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: libss-client-devel
BuildRequires: gettext
BuildRequires: edje-tools
#include <dpl/assert.h>
#include <dpl/string.h>
#include <dpl/wrt-dao-ro/widget_dao_read_only.h>
-#include <dpl/wrt-dao-ro/global_config.h>
#include <dpl/utils/mime_type_utils.h>
#include <dpl/log/secure_log.h>
+#include <pkgmgr-info.h>
namespace InjectedBundle {
namespace {
void initialize(WrtDB::TizenAppId appId)
{
_D("called");
+ m_initialized = true;
m_appId = appId;
WrtDB::WidgetDAOReadOnly dao(m_appId);
}
m_pkgId = dao.getTzPkgId();
- std::string installedPath =
- DPL::ToUTF8String(*dao.getWidgetInstalledPath());
- std::string preloadPath(WrtDB::GlobalConfig::GetUserPreloadedWidgetPath());
- if (0 == installedPath.compare(0, preloadPath.length(), preloadPath)) {
+ bool isPreload = false;
+ bool isUpdate = false;
+ pkgmgrinfo_pkginfo_h handle = NULL;
+ std::string tzPkgId = DPL::ToUTF8String(dao.getTizenPkgId());
+
+ if (PMINFO_R_OK != pkgmgrinfo_pkginfo_get_pkginfo(tzPkgId.c_str(), &handle)) {
+ _E("Can't get package information : %s", tzPkgId.c_str());
+ return;
+ }
+ if (PMINFO_R_OK != pkgmgrinfo_pkginfo_is_preload(handle, &isPreload)) {
+ _E("Can't get package information : %s", tzPkgId.c_str());
+ return;
+ }
+ if (PMINFO_R_OK != pkgmgrinfo_pkginfo_is_update(handle, &isUpdate)) {
+ _E("Can't get package information : %s", tzPkgId.c_str());
+ return;
+ }
+
+ if (isPreload && !isUpdate) {
m_isPreload = true;
_D("preload application");
}
-
- m_initialized = true;
}
void deinitialize(void)