pkgmgrinfo_pkginfo_h package_info;
if (pkgmgrinfo_pkginfo_get_usr_pkginfo(pkg_id.c_str(), uid, &package_info)
!= PMINFO_R_OK) {
- return installed_location;
+ return "";
}
pkgmgrinfo_installed_storage storage;
pkgmgrinfo_pkginfo_destroy_pkginfo(package_info);
if (!ok)
- return installed_location;
+ return "";
if (storage == PMINFO_EXTERNAL_STORAGE)
installed_location = "installed_external";
namespace {
const char kManifestFileName[] = "tizen-manifest.xml";
+const char kInstalledInternally[] = "installed_internal";
} // namepsace
// set installed_storage if package is installed
// this is internal field in package manager but after reading configuration
// we must know it
- std::string storage = QueryStorageForPkgId(manifest->package,
- context_->uid.get());
- manifest->installed_storage = strdup(storage.c_str());
+ if (manifest_location_ == ManifestLocation::INSTALLED ||
+ manifest_location_ == ManifestLocation::RECOVERY) {
+ std::string storage = QueryStorageForPkgId(manifest->package,
+ context_->uid.get());
+ if (storage.empty()) {
+ // Failed to query installation storage, assign internal for preloaded
+ // applications
+ manifest->installed_storage = strdup(kInstalledInternally);
+ } else {
+ manifest->installed_storage = strdup(storage.c_str());
+ }
+ } else {
+ manifest->installed_storage = strdup(kInstalledInternally);
+ }
if (ui_application_list) {
manifest->mainapp_id =