diff --git a/services/dtbschedmgr/include/continue/dsched_continue.h b/services/dtbschedmgr/include/continue/dsched_continue.h index 3e86e8c9..9b8d8b7f 100644 --- a/services/dtbschedmgr/include/continue/dsched_continue.h +++ b/services/dtbschedmgr/include/continue/dsched_continue.h @@ -166,6 +166,7 @@ private: int32_t OnContinueDataCmd(std::shared_ptr cmd); int32_t OnNotifyComplete(int32_t missionId, bool isSuccess); int32_t UpdateElementInfo(std::shared_ptr cmd); + std::string ContinueTypeFormat(const std::string &continueType); int32_t OnContinueEndCmd(std::shared_ptr cmd); int32_t OnContinueEnd(int32_t result); diff --git a/services/dtbschedmgr/src/continue/dsched_continue.cpp b/services/dtbschedmgr/src/continue/dsched_continue.cpp index e8667ba2..29b13ec9 100644 --- a/services/dtbschedmgr/src/continue/dsched_continue.cpp +++ b/services/dtbschedmgr/src/continue/dsched_continue.cpp @@ -424,6 +424,8 @@ int32_t DSchedContinue::OnNotifyComplete(int32_t missionId, bool isSuccess) int32_t DSchedContinue::UpdateElementInfo(std::shared_ptr cmd) { std::string moduleName = cmd->want_.GetStringParam(OHOS::AAFwk::Want::PARAM_MODULE_NAME); + std::string continueType = cmd->continueType_; + std::string formatContinueType = ContinueTypeFormat(continueType); DmsBundleInfo distributedBundleInfo; if (!DmsBmStorage::GetInstance()->GetDistributedBundleInfo( cmd->dstDeviceId_, cmd->dstBundleName_, distributedBundleInfo)) { @@ -439,7 +441,7 @@ int32_t DSchedContinue::UpdateElementInfo(std::shared_ptr for (const auto &abilityInfoElement: dmsAbilityInfos) { std::vector continueTypes = abilityInfoElement.continueType; for (const auto &continueTypeElement: continueTypes) { - if (continueTypeElement != cmd->continueType_) { + if (continueTypeElement != continueType && continueTypeElement != formatContinueType) { continue; } if (continueTypeElement == abilityInfoElement.abilityName && @@ -474,6 +476,17 @@ int32_t DSchedContinue::UpdateElementInfo(std::shared_ptr return ERR_OK; } +std::string DSchedContinue::ContinueTypeFormat(const std::string &continueType) +{ + std::string suffix = QUICK_START_CONFIGURATION; + if (suffix.length() <= continueType.length() && + continueType.rfind(suffix) == (continueType.length() - suffix.length())) { + return continueType.substr(0, continueType.rfind(QUICK_START_CONFIGURATION)); + } else { + return continueType + QUICK_START_CONFIGURATION; + } +} + int32_t DSchedContinue::OnContinueEndCmd(std::shared_ptr cmd) { HILOGI("called");