// obtain handle to application info
pkgmgrinfo_appinfo_h handle;
- int ret = pkgmgrinfo_appinfo_get_appinfo(app_id.c_str(), &handle);
+ int ret = pkgmgrinfo_appinfo_get_usr_appinfo(app_id.c_str(), getuid(), &handle);
if (PMINFO_R_OK != ret) {
LoggerE("Failed to get app info.");
ReportError(PlatformResult(ErrorCode::UNKNOWN_ERR, "Failed to get app info."), out);
}
pkgmgrinfo_appinfo_h handle;
- int ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
+ int ret = pkgmgrinfo_appinfo_get_usr_appinfo(appid, getuid(), &handle);
if (PMINFO_R_OK != ret) {
LoggerE("Failed to get appInfo");
} else {
return 0;
};
- int ret = pkgmgrinfo_appinfo_get_installed_list(app_info_cb, &array);
+ int ret = pkgmgrinfo_appinfo_get_usr_installed_list(app_info_cb, getuid(), &array);
if (APP_MANAGER_ERROR_NONE != ret) {
- LoggerE("pkgmgrinfo_appinfo_get_installed_list error");
+ LoggerE("pkgmgrinfo_appinfo_get_usr_installed_list error");
ReportError(PlatformResult(ErrorCode::UNKNOWN_ERR, "Unknown error."), &response_obj);
} else {
ReportSuccess(result, response_obj);
pkgmgrinfo_appinfo_h handle = nullptr;
- if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_appinfo(app_id.c_str(), &handle)) {
+ if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_usr_appinfo(app_id.c_str(), getuid(), &handle)) {
LoggerE("Failed to get app info");
ReportError(PlatformResult(ErrorCode::NOT_FOUND_ERR, "Failed to get app info."), out);
return;
pkgmgrinfo_pkginfo_h pkg_info = nullptr;
- int ret = pkgmgrinfo_pkginfo_get_pkginfo(package_id, &pkg_info);
+ int ret = pkgmgrinfo_pkginfo_get_usr_pkginfo(package_id, getuid(), &pkg_info);
std::unique_ptr<std::remove_pointer<pkgmgrinfo_pkginfo_h>::type, int(*)(pkgmgrinfo_pkginfo_h)>
pkg_info_ptr(pkg_info, &pkgmgrinfo_pkginfo_destroy_pkginfo); // automatically release the memory
pkgmgrinfo_appinfo_h handle = nullptr;
- int ret = pkgmgrinfo_appinfo_get_appinfo(app_id.c_str(), &handle);
+ int ret = pkgmgrinfo_appinfo_get_usr_appinfo(app_id.c_str(), getuid(), &handle);
std::unique_ptr<std::remove_pointer<pkgmgrinfo_appinfo_h>::type, int(*)(pkgmgrinfo_appinfo_h)>
pkg_info_ptr(handle, &pkgmgrinfo_appinfo_destroy_appinfo); // automatically release the memory
case Event::kUpdated:
{
pkgmgrinfo_appinfo_h handle = nullptr;
- if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_appinfo(app_id.c_str(), &handle)) {
+ if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_usr_appinfo(app_id.c_str(), getuid(), &handle)) {
LoggerE("Failed to get application information handle.");
continue;
}
start_time = clock();
picojson::array array_data;
- if ( pkgmgrinfo_pkginfo_get_list(PackageInfoGetListCb, &array_data)
+ if ( pkgmgrinfo_pkginfo_get_usr_list(PackageInfoGetListCb, &array_data, getuid())
!= PMINFO_R_OK ) {
LoggerE("Failed to get package information");
REPORT_ERROR(out, UnknownException("Any other platform error occurs"));
}
pkgmgrinfo_pkginfo_h info;
- if ( pkgmgrinfo_pkginfo_get_pkginfo(package_id, &info)
+ if ( pkgmgrinfo_pkginfo_get_usr_pkginfo(package_id, getuid(), &info)
!= PMINFO_R_OK ) {
LoggerE("Failed to get pkginfo");
REPORT_ERROR(out, NotFoundException("The package with the specified ID is not found"));