!5498 解决免安装过程中的安全问题

Merge pull request !5498 from 赵淦/master
This commit is contained in:
openharmony_ci 2024-03-10 06:46:53 +00:00 committed by Gitee
commit 636263e0b8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -831,14 +831,7 @@ void BundleConnectAbilityMgr::GetTargetAbilityInfo(const Want &want, int32_t use
targetAbilityInfo->targetInfo.type = want.GetType();
targetAbilityInfo->targetInfo.callingUid = callingUid;
targetAbilityInfo->targetInfo.callingAppType = CALLING_TYPE_HARMONY;
std::string callingAppId = want.GetStringParam(PARAM_FREEINSTALL_APPID);
if (!callingAppId.empty()) {
callingAppids.push_back(callingAppId);
}
callingBundleNames = want.GetStringArrayParam(PARAM_FREEINSTALL_BUNDLENAMES);
if (callingAppids.empty() && callingBundleNames.empty()) {
this->GetCallingInfo(userId, callingUid, callingBundleNames, callingAppids);
}
this->GetCallingInfo(userId, callingUid, callingBundleNames, callingAppids);
targetAbilityInfo->targetInfo.callingBundleNames = callingBundleNames;
targetAbilityInfo->targetInfo.flags = GetTargetInfoFlag(want, deviceId, bundleName, callingBundleNames);
targetAbilityInfo->targetInfo.reasonFlag = static_cast<int32_t>(innerBundleInfo.GetModuleUpgradeFlag(moduleName));