diff --git a/common/include/dtbschedmgr_log.h b/common/include/dtbschedmgr_log.h index 1e8462f9..fa820ab5 100644 --- a/common/include/dtbschedmgr_log.h +++ b/common/include/dtbschedmgr_log.h @@ -529,6 +529,10 @@ enum { * Result(29360238) for get window failed from scb. */ DMS_GET_WINDOW_FAILED_FROM_SCB = 29360238, + /** + * Result(29360238) for BMS can not find the specified module. + */ + CAN_NOT_FOUND_MODULE_ERR = 29360239, }; } // namespace DistributedSchedule } // namespace OHOS diff --git a/services/dtbschedmgr/include/continue/dsched_continue.h b/services/dtbschedmgr/include/continue/dsched_continue.h index 2c64757e..2cea7492 100644 --- a/services/dtbschedmgr/include/continue/dsched_continue.h +++ b/services/dtbschedmgr/include/continue/dsched_continue.h @@ -154,6 +154,10 @@ private: int32_t ExecuteContinueReply(); int32_t ExecuteContinueSend(std::shared_ptr data); int32_t ExecuteContinueData(std::shared_ptr cmd); + int32_t UpdateElementInfo(std::shared_ptr cmd); + void FindSinkContinueAbilityInfo(const std::string &srcModuleName, const std::string &srcContinueType, + std::vector &dmsAbilityInfos, std::vector &result); + void ContinueTypeFormat(std::string &continueType); int32_t ExecuteNotifyComplete(int32_t result); int32_t ExecuteContinueEnd(int32_t result); int32_t ExecuteContinueError(int32_t result); diff --git a/services/dtbschedmgr/include/mission/distributed_bm_storage.h b/services/dtbschedmgr/include/mission/distributed_bm_storage.h index 07fff61d..fee5db27 100644 --- a/services/dtbschedmgr/include/mission/distributed_bm_storage.h +++ b/services/dtbschedmgr/include/mission/distributed_bm_storage.h @@ -63,6 +63,8 @@ public: std::string& bundleName); bool GetDistributedBundleInfo(const std::string &networkId, const uint16_t &bundleNameId, DmsBundleInfo &distributeBundleInfo); + bool GetDistributedBundleInfo(const std::string &networkId, const std::string &bundleName, + DmsBundleInfo &distributeBundleInfo); bool GetBundleNameId(const std::string& bundleName, uint16_t &bundleNameId); std::string GetContinueType(const std::string &networkId, std::string &bundleName, uint8_t continueTypeId); std::string GetAbilityName(const std::string &networkId, std::string &bundleName, std::string &continueType); diff --git a/services/dtbschedmgr/include/mission/dms_continue_recv_manager.h b/services/dtbschedmgr/include/mission/dms_continue_recv_manager.h index fe9b110e..5c8ab8bd 100644 --- a/services/dtbschedmgr/include/mission/dms_continue_recv_manager.h +++ b/services/dtbschedmgr/include/mission/dms_continue_recv_manager.h @@ -104,7 +104,7 @@ private: const int32_t state, const int32_t retry = 0); void NotifyRecvBroadcast(const sptr& obj, const currentIconInfo& continueInfo, const int32_t state); bool IsBundleContinuable(const AppExecFwk::BundleInfo& bundleInfo, const std::string &srcAbilityName, - const std::string &srcContinueType, bool isSameBundle); + const std::string &srcContinueType); std::string ContinueTypeFormat(const std::string &continueType); void FindToNotifyRecvBroadcast(const std::string& senderNetworkId, const std::string& bundleName, const std::string& continueType); diff --git a/services/dtbschedmgr/src/continue/dsched_continue.cpp b/services/dtbschedmgr/src/continue/dsched_continue.cpp index fab8be91..0a3a125f 100644 --- a/services/dtbschedmgr/src/continue/dsched_continue.cpp +++ b/services/dtbschedmgr/src/continue/dsched_continue.cpp @@ -932,6 +932,10 @@ int32_t DSchedContinue::ExecuteContinueData(std::shared_ptr cmd) +{ + std::string srcModuleName = cmd->want_.GetModuleName(); + if (srcModuleName.empty()) { + HILOGD("UpdateElementInfo srcModuleName from element is empty"); + srcModuleName = cmd->want_.GetStringParam(OHOS::AAFwk::Want::PARAM_MODULE_NAME); + } + std::string srcContinueType = cmd->continueType_; + ContinueTypeFormat(srcContinueType); + HILOGD("UpdateElementInfo srcModuleName: %{public}s; srcContinueType:%{public}s", srcModuleName.c_str(), + srcContinueType.c_str()); + DmsBundleInfo distributedBundleInfo; + std::string localDeviceId; + if (!GetLocalDeviceId(localDeviceId) || !DmsBmStorage::GetInstance()->GetDistributedBundleInfo( + localDeviceId, cmd->dstBundleName_, distributedBundleInfo)) { + HILOGE("UpdateElementInfo can not found bundle info for bundle name: %{public}s", + cmd->dstBundleName_.c_str()); + return CAN_NOT_FOUND_MODULE_ERR; + } + + std::vector dmsAbilityInfos = distributedBundleInfo.dmsAbilityInfos; + std::vector result; + FindSinkContinueAbilityInfo(srcModuleName, srcContinueType, dmsAbilityInfos, result); + if (result.empty()) { + HILOGE("UpdateElementInfo can not found bundle info for bundle name: %{public}s", + cmd->dstBundleName_.c_str()); + return CAN_NOT_FOUND_MODULE_ERR; + } + auto element = cmd->want_.GetElement(); + DmsAbilityInfo finalAbility = result[0]; + HILOGD("UpdateElementInfo final sink ability detail info: " + "bundleName: %{public}s; abilityName: %{public}s; moduleName: %{public}s", + cmd->dstBundleName_.c_str(), finalAbility.abilityName.c_str(), finalAbility.moduleName.c_str()); + cmd->want_.SetElementName(element.GetDeviceID(), cmd->dstBundleName_, finalAbility.abilityName, + finalAbility.moduleName); + return ERR_OK; +} + +void DSchedContinue::FindSinkContinueAbilityInfo(const std::string &srcModuleName, const std::string &srcContinueType, + std::vector &dmsAbilityInfos, std::vector &result) +{ + bool sameModuleGot = false; + for (const auto &abilityInfoElement: dmsAbilityInfos) { + std::vector continueTypes = abilityInfoElement.continueType; + for (std::string &continueTypeElement: continueTypes) { + ContinueTypeFormat(continueTypeElement); + HILOGD("UpdateElementInfo check sink continue ability, current: " + "continueType: %{public}s; abilityName: %{public}s; moduleName: %{public}s", + continueTypeElement.c_str(), abilityInfoElement.abilityName.c_str(), + abilityInfoElement.moduleName.c_str()); + if (continueTypeElement != srcContinueType) { + continue; + } + if (srcModuleName == abilityInfoElement.moduleName) { + sameModuleGot = true; + result.clear(); + result.push_back(abilityInfoElement); + break; + } else { + result.push_back(abilityInfoElement); + break; + } + } + if (sameModuleGot) { + break; + } + } +} + +void DSchedContinue::ContinueTypeFormat(std::string &continueType) +{ + std::string suffix = QUICK_START_CONFIGURATION; + if (suffix.length() <= continueType.length() && + continueType.rfind(suffix) == (continueType.length() - suffix.length())) { + continueType = continueType.substr(0, continueType.rfind(QUICK_START_CONFIGURATION)); + } +} + int32_t DSchedContinue::UpdateWantForContinueType(OHOS::AAFwk::Want& want) { std::string srcAbilityName = want.GetElement().GetAbilityName(); diff --git a/services/dtbschedmgr/src/mission/distributed_bm_storage.cpp b/services/dtbschedmgr/src/mission/distributed_bm_storage.cpp index b84b4ebd..67f49f33 100644 --- a/services/dtbschedmgr/src/mission/distributed_bm_storage.cpp +++ b/services/dtbschedmgr/src/mission/distributed_bm_storage.cpp @@ -453,6 +453,57 @@ bool DmsBmStorage::GetDistributedBundleInfo(const std::string &networkId, return true; } +bool DmsBmStorage::GetDistributedBundleInfo(const std::string &networkId, const std::string &bundleName, + DmsBundleInfo &distributeBundleInfo) +{ + HILOGD("networkId: %{public}s bundleNameId: %{public}s", GetAnonymStr(networkId).c_str(), bundleName.c_str()); + if (!CheckKvStore()) { + HILOGE("kvStore is nullptr"); + return false; + } + std::string udid = DtbschedmgrDeviceInfoStorage::GetInstance().GetUdidByNetworkId(networkId); + std::string uuid = DtbschedmgrDeviceInfoStorage::GetInstance().GetUuidByNetworkId(networkId); + if (udid == "" || uuid == "") { + HILOGE("can not get udid or uuid"); + return false; + } + HILOGI("uuid: %{public}s", GetAnonymStr(uuid).c_str()); + std::vector remoteEntries; + Status status = kvStorePtr_->GetDeviceEntries(uuid, remoteEntries); + if (remoteEntries.empty() || status != Status::SUCCESS) { + HILOGE("GetDeviceEntries error: %{public}d or remoteEntries is empty", status); + return false; + } + + std::vector reduRiskEntries; + std::string keyOfPublic = udid + AppExecFwk::Constants::FILE_UNDERLINE + PUBLIC_RECORDS; + for (auto entry: remoteEntries) { + std::string key = entry.key.ToString(); + std::string value = entry.value.ToString(); + if (key.find(keyOfPublic) != std::string::npos) { + continue; + } + DmsBundleInfo distributedBundleInfoTmp; + if (distributedBundleInfoTmp.FromJsonString(value) + && distributedBundleInfoTmp.bundleName == bundleName) { + distributeBundleInfo = distributedBundleInfoTmp; + reduRiskEntries.push_back(entry); + } + } + if (reduRiskEntries.size() > 1) { + HILOGE("Redundant data needs to be deleted."); + DelReduData(networkId, reduRiskEntries); + distributeBundleInfo = DmsBundleInfo(); + return false; + } + if (reduRiskEntries.empty()) { + HILOGE("get distributedBundleInfo failed."); + return false; + } + HILOGD("end."); + return true; +} + Status DmsBmStorage::GetResultSatus(std::promise &resultStatusSignal) { auto future = resultStatusSignal.get_future(); diff --git a/services/dtbschedmgr/src/mission/dms_continue_recv_manager.cpp b/services/dtbschedmgr/src/mission/dms_continue_recv_manager.cpp index 2bc6717f..bc3e1fe5 100644 --- a/services/dtbschedmgr/src/mission/dms_continue_recv_manager.cpp +++ b/services/dtbschedmgr/src/mission/dms_continue_recv_manager.cpp @@ -332,9 +332,8 @@ int32_t DMSContinueRecvMgr::DealOnBroadcastBusiness(const std::string& senderNet HILOGE("The bundleType must be app, but it is %{public}d", localBundleInfo.applicationInfo.bundleType); return INVALID_PARAMETERS_ERR; } - bool isSameBundle = (bundleName == finalBundleName); if (state == ACTIVE - && !IsBundleContinuable(localBundleInfo, abilityInfo.abilityName, continueType, isSameBundle)) { + && !IsBundleContinuable(localBundleInfo, abilityInfo.abilityName, continueType)) { HILOGE("Bundle %{public}s is not continuable", finalBundleName.c_str()); return BUNDLE_NOT_CONTINUABLE; } @@ -359,7 +358,7 @@ int32_t DMSContinueRecvMgr::DealOnBroadcastBusiness(const std::string& senderNet } bool DMSContinueRecvMgr::IsBundleContinuable(const AppExecFwk::BundleInfo& bundleInfo, - const std::string &srcAbilityName, const std::string &srcContinueType, bool isSameBundle) + const std::string &srcAbilityName, const std::string &srcContinueType) { std::string formatSrcContinueType = ContinueTypeFormat(srcContinueType); for (auto &abilityInfo: bundleInfo.abilityInfos) { @@ -368,16 +367,12 @@ bool DMSContinueRecvMgr::IsBundleContinuable(const AppExecFwk::BundleInfo& bundl } for (const auto &continueTypeItem: abilityInfo.continueType) { HILOGI("IsBundleContinuable check: srcAbilityName:%{public}s; srcContinueType:%{public}s;" - " sinkAbilityName:%{public}s; sinkContinueType:%{public}s; isSameBundle: %{public}d", + " sinkAbilityName:%{public}s; sinkContinueType:%{public}s; ", srcAbilityName.c_str(), srcContinueType.c_str(), abilityInfo.name.c_str(), - continueTypeItem.c_str(), isSameBundle); + continueTypeItem.c_str()); if (continueTypeItem == srcContinueType || continueTypeItem == formatSrcContinueType) { return true; } - if ((srcContinueType == srcAbilityName || abilityInfo.name == continueTypeItem) - && isSameBundle && abilityInfo.name == srcAbilityName) { - return true; - } } } return false; diff --git a/services/dtbschedmgr/test/unittest/continue/dsched_continue_test.cpp b/services/dtbschedmgr/test/unittest/continue/dsched_continue_test.cpp index a83d7553..1e42e502 100644 --- a/services/dtbschedmgr/test/unittest/continue/dsched_continue_test.cpp +++ b/services/dtbschedmgr/test/unittest/continue/dsched_continue_test.cpp @@ -20,6 +20,7 @@ #include "dtbschedmgr_log.h" #include "softbus_error_code.h" #include "test_log.h" +#include "mission/distributed_bm_storage.h" using namespace testing; using namespace testing::ext; @@ -30,6 +31,15 @@ namespace DistributedSchedule { namespace { const std::string BASEDIR = "/data/service/el1/public/database/DistributedSchedule"; const std::string BUNDLEMAME_1 = "bundleName"; + const std::string CONTINUE_TYPE1 = "continueType1"; + const std::string CONTINUE_TYPE2 = "continueType2"; + const std::string CONTINUE_TYPE3 = "continueType3"; + const std::string CONTINUE_TYPE1_QUICK = "continueType1_ContinueQuickStart"; + const std::string MODULE_NAME1 = "moduleName1"; + const std::string MODULE_NAME2 = "moduleName2"; + const std::string MODULE_NAME3 = "moduleName3"; + const std::string ABILITY_NAME_SAME_AS_CONTINUE_TYPE = CONTINUE_TYPE1; + const std::string ABILITY_NAME_DIFF_AS_CONTINUE_TYPE = "ability"; const int32_t WAITTIME = 2000; const uint32_t DSCHED_BUFFER_SIZE = 1024; } @@ -619,6 +629,80 @@ HWTEST_F(DSchedContinueTest, DSchedContinueTest_0017_1, TestSize.Level0) usleep(WAITTIME); } +/** + * @tc.name: DSchedContinueTest_0017_2 + * @tc.desc: UpdateElementInfo + * @tc.type: FUNC + */ +HWTEST_F(DSchedContinueTest, DSchedContinueTest_0017_2, TestSize.Level0) +{ + DTEST_LOG << "DSchedContinueTest DSchedContinueTest_0017_2 begin" << std::endl; + std::string deviceId = "123"; + std::string bundleName = "test"; + int32_t subType = CONTINUE_PULL; + int32_t direction = CONTINUE_SINK; + sptr callback = nullptr; + auto info = DSchedContinueInfo(deviceId, bundleName, deviceId, bundleName, ""); + auto conti = std::make_shared(subType, direction, callback, info); + conti->Init(); + auto cmd = std::make_shared(); + // no same continueType, diff module + EXPECT_CALL(*dmsStoreMock, GetLocalDeviceId(_)).WillOnce(Return(true)); + cmd->continueType_ = CONTINUE_TYPE3; + cmd->want_.SetElementName("", BUNDLEMAME_1, ABILITY_NAME_SAME_AS_CONTINUE_TYPE, MODULE_NAME2); + int32_t ret = conti->UpdateElementInfo(cmd); + EXPECT_EQ(ret, CAN_NOT_FOUND_MODULE_ERR); + // no continueType, same module + EXPECT_CALL(*dmsStoreMock, GetLocalDeviceId(_)).WillOnce(Return(true)); + cmd->continueType_ = CONTINUE_TYPE1; + cmd->want_.SetElementName("", BUNDLEMAME_1, ABILITY_NAME_SAME_AS_CONTINUE_TYPE, MODULE_NAME1); + ret = conti->UpdateElementInfo(cmd); + EXPECT_EQ(ret, ERR_OK); + // no continueType with quick start, same module + EXPECT_CALL(*dmsStoreMock, GetLocalDeviceId(_)).WillOnce(Return(true)); + cmd->continueType_ = CONTINUE_TYPE1_QUICK; + cmd->want_.SetElementName("", BUNDLEMAME_1, ABILITY_NAME_SAME_AS_CONTINUE_TYPE, MODULE_NAME1); + ret = conti->UpdateElementInfo(cmd); + EXPECT_EQ(ret, ERR_OK); + // has continueType, same module + EXPECT_CALL(*dmsStoreMock, GetLocalDeviceId(_)).WillOnce(Return(true)); + cmd->continueType_ = CONTINUE_TYPE2; + cmd->want_.SetElementName("", BUNDLEMAME_1, ABILITY_NAME_DIFF_AS_CONTINUE_TYPE, MODULE_NAME2); + ret = conti->UpdateElementInfo(cmd); + EXPECT_EQ(ret, ERR_OK); + // has continueType, diff module + EXPECT_CALL(*dmsStoreMock, GetLocalDeviceId(_)).WillOnce(Return(true)); + cmd->continueType_ = CONTINUE_TYPE2; + cmd->want_.SetElementName("", BUNDLEMAME_1, ABILITY_NAME_DIFF_AS_CONTINUE_TYPE, MODULE_NAME1); + ret = conti->UpdateElementInfo(cmd); + EXPECT_EQ(ret, ERR_OK); + // has continueType, no module + EXPECT_CALL(*dmsStoreMock, GetLocalDeviceId(_)).WillOnce(Return(true)); + cmd->continueType_ = CONTINUE_TYPE2; + cmd->want_.SetElementName("", BUNDLEMAME_1, ABILITY_NAME_DIFF_AS_CONTINUE_TYPE, MODULE_NAME3); + ret = conti->UpdateElementInfo(cmd); + EXPECT_EQ(ret, ERR_OK); + DTEST_LOG << "DSchedContinueTest DSchedContinueTest_0017_2 end ret:" << ret << std::endl; + usleep(WAITTIME); +} + +bool DmsBmStorage::GetDistributedBundleInfo(const std::string &networkId, const std::string &bundleName, + DmsBundleInfo &distributeBundleInfo) +{ + DmsAbilityInfo info2; + info2.continueType = {CONTINUE_TYPE2}; + info2.moduleName = MODULE_NAME2; + info2.abilityName = ABILITY_NAME_DIFF_AS_CONTINUE_TYPE; + distributeBundleInfo.dmsAbilityInfos.push_back(info2); + + DmsAbilityInfo info1; + info1.continueType = {CONTINUE_TYPE1}; + info1.moduleName = MODULE_NAME1; + info1.abilityName = ABILITY_NAME_SAME_AS_CONTINUE_TYPE; + distributeBundleInfo.dmsAbilityInfos.push_back(info1); + return true; +} + /** * @tc.name: DSchedContinueTest_0018_1 * @tc.desc: ExecuteNotifyComplete diff --git a/services/dtbschedmgr/test/unittest/mission/dms_continue_manager_test.cpp b/services/dtbschedmgr/test/unittest/mission/dms_continue_manager_test.cpp index 1e0cde3a..7437ba84 100644 --- a/services/dtbschedmgr/test/unittest/mission/dms_continue_manager_test.cpp +++ b/services/dtbschedmgr/test/unittest/mission/dms_continue_manager_test.cpp @@ -1059,7 +1059,6 @@ HWTEST_F(DMSContinueManagerTest, testIsBundleContinuable_001, TestSize.Level1) DTEST_LOG << "DMSContinueManagerTest testIsBundleContinuable_001 start" << std::endl; std::string srcAbilityName = "abilityName"; std::string srcContinueType = "continueType"; - bool isSameBundle = true; AppExecFwk::BundleInfo localBundleInfo; std::vector abilityInfos; @@ -1074,14 +1073,9 @@ HWTEST_F(DMSContinueManagerTest, testIsBundleContinuable_001, TestSize.Level1) localBundleInfo.abilityInfos = abilityInfos; auto recvMgr = MultiUserManager::GetInstance().GetCurrentRecvMgr(); ASSERT_NE(nullptr, recvMgr); - bool ret = recvMgr->IsBundleContinuable(localBundleInfo, srcAbilityName, - srcContinueType, isSameBundle); + bool ret = recvMgr->IsBundleContinuable(localBundleInfo, srcAbilityName, srcContinueType); EXPECT_EQ(ret, false); - isSameBundle = false; - ret = recvMgr->IsBundleContinuable(localBundleInfo, srcAbilityName, - srcContinueType, isSameBundle); - EXPECT_EQ(ret, false); DTEST_LOG << "DMSContinueManagerTest testIsBundleContinuable_001 end" << std::endl; } @@ -1095,7 +1089,6 @@ HWTEST_F(DMSContinueManagerTest, testIsBundleContinuable_002, TestSize.Level1) DTEST_LOG << "DMSContinueManagerTest testIsBundleContinuable_002 start" << std::endl; std::string srcAbilityName = "abilityName"; std::string srcContinueType = "continueType"; - bool isSameBundle = true; AppExecFwk::BundleInfo localBundleInfo; std::vector abilityInfos; @@ -1110,13 +1103,7 @@ HWTEST_F(DMSContinueManagerTest, testIsBundleContinuable_002, TestSize.Level1) localBundleInfo.abilityInfos = abilityInfos; auto recvMgr = MultiUserManager::GetInstance().GetCurrentRecvMgr(); ASSERT_NE(nullptr, recvMgr); - bool ret = recvMgr->IsBundleContinuable(localBundleInfo, srcAbilityName, - srcContinueType, isSameBundle); - EXPECT_EQ(ret, true); - - isSameBundle = false; - ret = recvMgr->IsBundleContinuable(localBundleInfo, srcAbilityName, - srcContinueType, isSameBundle); + bool ret = recvMgr->IsBundleContinuable(localBundleInfo, srcAbilityName, srcContinueType); EXPECT_EQ(ret, true); DTEST_LOG << "DMSContinueManagerTest testIsBundleContinuable_002 end" << std::endl; } @@ -1133,7 +1120,6 @@ HWTEST_F(DMSContinueManagerTest, testIsBundleContinuable_003, TestSize.Level1) std::string sinkAbilityName = "sinkAbilityName"; std::string srcContinueType = "srcContinueType"; std::string sinkContinueType = "sinkContinueType"; - bool isSameBundle = false; AppExecFwk::BundleInfo localBundleInfo; std::vector abilityInfos; @@ -1148,10 +1134,9 @@ HWTEST_F(DMSContinueManagerTest, testIsBundleContinuable_003, TestSize.Level1) localBundleInfo.abilityInfos = abilityInfos; auto recvMgr = MultiUserManager::GetInstance().GetCurrentRecvMgr(); ASSERT_NE(nullptr, recvMgr); - bool ret = recvMgr->IsBundleContinuable(localBundleInfo, srcAbilityName, - srcContinueType, isSameBundle); + bool ret = recvMgr->IsBundleContinuable(localBundleInfo, srcAbilityName, srcContinueType); EXPECT_EQ(ret, false); - DTEST_LOG << "DMSContinueManagerTest testIsBundleContinuable_002 end" << std::endl; + DTEST_LOG << "DMSContinueManagerTest testIsBundleContinuable_003 end" << std::endl; } /** @@ -1166,7 +1151,6 @@ HWTEST_F(DMSContinueManagerTest, testIsBundleContinuable_004, TestSize.Level1) std::string sinkAbilityName = "sinkAbilityName"; std::string srcContinueType = srcAbilityName; std::string sinkContinueType = "sinkContinueType"; - bool isSameBundle = true; AppExecFwk::BundleInfo localBundleInfo; std::vector abilityInfos; @@ -1181,8 +1165,7 @@ HWTEST_F(DMSContinueManagerTest, testIsBundleContinuable_004, TestSize.Level1) localBundleInfo.abilityInfos = abilityInfos; auto recvMgr = MultiUserManager::GetInstance().GetCurrentRecvMgr(); ASSERT_NE(nullptr, recvMgr); - bool ret = recvMgr->IsBundleContinuable(localBundleInfo, srcAbilityName, - srcContinueType, isSameBundle); + bool ret = recvMgr->IsBundleContinuable(localBundleInfo, srcAbilityName, srcContinueType); EXPECT_EQ(ret, false); DTEST_LOG << "DMSContinueManagerTest testIsBundleContinuable_004 end" << std::endl; } @@ -1194,12 +1177,11 @@ HWTEST_F(DMSContinueManagerTest, testIsBundleContinuable_004, TestSize.Level1) */ HWTEST_F(DMSContinueManagerTest, testIsBundleContinuable_005, TestSize.Level1) { - DTEST_LOG << "DMSContinueManagerTest testIsBundleContinuable_004 start" << std::endl; + DTEST_LOG << "DMSContinueManagerTest testIsBundleContinuable_005 start" << std::endl; std::string srcAbilityName = "srcAbilityName"; std::string sinkAbilityName = "sinkAbilityName"; std::string srcContinueType = srcAbilityName; std::string sinkContinueType = "sinkContinueType"; - bool isSameBundle = true; AppExecFwk::BundleInfo localBundleInfo; std::vector abilityInfos; @@ -1214,9 +1196,8 @@ HWTEST_F(DMSContinueManagerTest, testIsBundleContinuable_005, TestSize.Level1) localBundleInfo.abilityInfos = abilityInfos; auto recvMgr = MultiUserManager::GetInstance().GetCurrentRecvMgr(); ASSERT_NE(nullptr, recvMgr); - bool ret = recvMgr->IsBundleContinuable(localBundleInfo, srcAbilityName, - srcContinueType, isSameBundle); - EXPECT_EQ(ret, true); + bool ret = recvMgr->IsBundleContinuable(localBundleInfo, srcAbilityName, srcContinueType); + EXPECT_EQ(ret, false); DTEST_LOG << "DMSContinueManagerTest testIsBundleContinuable_005 end" << std::endl; }