对delegator放行

Signed-off-by: savior-xzh <xuzheheng2@huawei.com>
Change-Id: I26b61bdfa225bac48ce11d37de5d52514ba1108c
This commit is contained in:
savior-xzh
2024-07-05 16:06:36 +08:00
parent 3aade6eafe
commit ae1d3396db
@@ -8290,8 +8290,13 @@ AppExecFwk::ElementName AbilityManagerService::GetTopAbility(bool isNeedLocalDev
TAG_LOGD(AAFwkTag::ABILITYMGR, "%{public}s start.", __func__);
AppExecFwk::ElementName elementName = {};
if (!PermissionVerification::GetInstance()->JudgeCallerIsAllowedToUseSystemAPI()) {
TAG_LOGE(AAFwkTag::ABILITYMGR, "caller can not use system-api.");
return elementName;
auto callerPid = IPCSkeleton::GetCallingPid();
AppExecFwk::RunningProcessInfo processInfo;
DelayedSingleton<AppScheduler>::GetInstance()->GetRunningProcessInfoByPid(callerPid, processInfo);
if (!processInfo.isTestProcess) {
TAG_LOGE(AAFwkTag::ABILITYMGR, "caller can not use system-api or not test process.");
return elementName;
}
}
#ifdef SUPPORT_GRAPHICS
sptr<IRemoteObject> token;