From: j-h.choi Date: Mon, 4 Nov 2024 08:19:24 +0000 (+0900) Subject: Added resource path for RPK type X-Git-Tag: accepted/tizen/9.0/unified/20241121.045854~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3065cad0959a7c9364b5de198fc91f447b79fb8e;p=platform%2Fcore%2Fdotnet%2Flauncher.git Added resource path for RPK type Change-Id: If54321c97669092452c70475995b9c446d10b2a7 --- diff --git a/NativeLauncher/util/utils.cc b/NativeLauncher/util/utils.cc index d6b226d..d951450 100644 --- a/NativeLauncher/util/utils.cc +++ b/NativeLauncher/util/utils.cc @@ -962,7 +962,25 @@ bool isNCDBStartupHookProvided() std::string getResourcePaths(const std::string& rootPath) { - return rootPath + "/lib" + ":" + rootPath + "/res/allowed"; + std::string paths = rootPath + "/lib" + ":" + rootPath + "/res/allowed"; + char *resType = NULL; + + pkgmgrinfo_pkginfo_h pkg_handle; + int ret = pkgmgrGetPkgInfo(getPkgId(rootPath), &pkg_handle); + if (ret != 0) { + return paths; + } + ret = pkgmgrinfo_pkginfo_get_res_type(pkg_handle, &resType); + if (ret != PMINFO_R_OK) { + pkgmgrinfo_pkginfo_destroy_pkginfo(pkg_handle); + return paths; + } + + paths += ":" + rootPath + "/res/allowed/" + resType; + + pkgmgrinfo_pkginfo_destroy_pkginfo(pkg_handle); + + return paths; } bool isRPK(const std::string& pkgId)