diff --git a/interfaces/innerkits/include/appspawn.h b/interfaces/innerkits/include/appspawn.h index 3bf66bfa1be45d9e3eb30adf9d2463149be556db..7cdf7212e7802274fce37efd92d34c50c134a87c 100644 --- a/interfaces/innerkits/include/appspawn.h +++ b/interfaces/innerkits/include/appspawn.h @@ -295,6 +295,7 @@ int AppSpawnClientAddPermission(AppSpawnClientHandle handle, AppSpawnReqMsgHandl #define MSG_EXT_NAME_JIT_PERMISSIONS "Permissions" #define MSG_EXT_NAME_USERID "uid" #define MSG_EXT_NAME_EXTENSION_TYPE "ExtensionType" +#define MSG_EXT_NAME_API_TARGET_VERSION "APITargetVersion" #define MSG_EXT_NAME_PARENT_UID "ParentUid" int AppSpawnReqMsgAddExtInfo(AppSpawnReqMsgHandle reqHandle, const char *name, const uint8_t *value, uint32_t valueLen); diff --git a/modules/common/appspawn_common.c b/modules/common/appspawn_common.c index 6ce56b278bdf850bffdb602b9da410848a4ed464..5eb5610122643723a598e3898c7fc5a6fa66ed8f 100644 --- a/modules/common/appspawn_common.c +++ b/modules/common/appspawn_common.c @@ -220,7 +220,9 @@ static int SetXpmConfig(const AppSpawnMgr *content, const AppSpawningCtx *proper idType = PROCESS_OWNERID_APP; ownerId = ownerInfo->ownerId; } - int ret = InitXpm(jitfortEnable, idType, ownerId); + + char *apiTargetVersionStr = GetAppPropertyExt(property, MSG_EXT_NAME_API_TARGET_VERSION, &len); + int ret = InitXpm(jitfortEnable, idType, ownerId, apiTargetVersionStr); APPSPAWN_CHECK(ret == 0, return ret, "set xpm region failed: %{public}d", ret); #endif return 0;