#define AUL_K_COM_FILTER "__AUL_COM_FILTER__"
/** AUL internal private key */
#define AUL_K_COM_RESULT "__AUL_COM_RESULT__"
+/** AUL internal private key */
+#define AUL_K_ROOT_PATH "__AUL_ROOT_PATH__"
/**
* @brief This is callback function for aul_launch_init
/*
* This API is only for Appfw internally.
*/
+void aul_set_preinit_root_path(const char *root_path);
+
+/*
+ * This API is only for Appfw internally.
+ */
+const char *aul_get_preinit_root_path(void);
+
+/*
+ * This API is only for Appfw internally.
+ */
int aul_update_freezer_status(int pid, const char* type);
/*
int ret;
pkgmgrinfo_pkginfo_h pkginfo;
int len;
+ const char *root_path;
+
+ root_path = aul_get_preinit_root_path();
+ if (appid == NULL && root_path) {
+ len = root_path ? strlen(root_path) : 0;
+ snprintf(buf, sizeof(buf), "%s%s%s", root_path,
+ root_path[len - 1] == '/' ? "" : "/",
+ dir_name ? dir_name : "");
+ *path = strdup(buf);
+ return AUL_R_OK;
+ }
ret = __get_pkgid(pkgid, sizeof(pkgid), appid, uid);
if (ret != AUL_R_OK)
static const char *__appid = NULL;
static const char *__pkgid = NULL;
+static const char *__root_path = NULL;
API int aul_app_get_pid(const char *appid)
{
__pkgid = pkgid;
}
+API void aul_set_preinit_root_path(const char *root_path)
+{
+ __root_path = root_path;
+}
+
+API const char *aul_get_preinit_root_path(void)
+{
+ return __root_path;
+}
+
static int __get_info_bypid(int pid, char *appid, int len, int cmd)
{
char *result;