mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-27 00:20:44 +00:00
CodeReview
Signed-off-by: MisterE <smart_e@126.com>
This commit is contained in:
commit
c581f27ffe
@ -373,23 +373,23 @@ bool DMSContinueRecvMgr::IsBundleContinuable(const AppExecFwk::BundleInfo& bundl
|
|||||||
std::string formatSrcContinueType = ContinueTypeFormat(srcContinueType);
|
std::string formatSrcContinueType = ContinueTypeFormat(srcContinueType);
|
||||||
bool continuable = false;
|
bool continuable = false;
|
||||||
bool isSameAbility = false;
|
bool isSameAbility = false;
|
||||||
for (auto abilityInfo: bundleInfo.abilityInfos) {
|
for (auto &abilityInfo: bundleInfo.abilityInfos) {
|
||||||
if (!abilityInfo.continuable) {
|
if (!abilityInfo.continuable) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
continuable = true;
|
continuable = true;
|
||||||
isSameAbility = false;
|
isSameAbility = false;
|
||||||
for (const auto &continueTypeItem: abilityInfo.continueType) {
|
for (const auto &continueTypeItem: abilityInfo.continueType) {
|
||||||
if ((srcContinueType == srcAbilityName || abilityInfo.name == continueTypeItem)
|
|
||||||
&& abilityInfo.name == srcAbilityName) {
|
|
||||||
isSameAbility = true;
|
|
||||||
}
|
|
||||||
if (continueTypeItem == srcContinueType || continueTypeItem == formatSrcContinueType) {
|
if (continueTypeItem == srcContinueType || continueTypeItem == formatSrcContinueType) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if ((srcContinueType == srcAbilityName || abilityInfo.name == continueTypeItem)
|
||||||
|
&& isSameBundle && abilityInfo.name == srcAbilityName) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return continuable && isSameBundle && isSameAbility;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string DMSContinueRecvMgr::ContinueTypeFormat(const std::string &continueType)
|
std::string DMSContinueRecvMgr::ContinueTypeFormat(const std::string &continueType)
|
||||||
|
Loading…
Reference in New Issue
Block a user