diff --git a/services/backup_sa/include/module_ipc/service.h b/services/backup_sa/include/module_ipc/service.h index 359b508808cd25c05c7d6740fd40326abba2f37c..271c59d559dfef2b9974bd9317c365a37f878b5a 100644 --- a/services/backup_sa/include/module_ipc/service.h +++ b/services/backup_sa/include/module_ipc/service.h @@ -45,6 +45,11 @@ struct BundleTaskInfo { std::string reportTime; ErrCode errCode; }; + +struct BundleBroadCastInfo { + std::map broadCastInfoMap = {}; + int userId = 0; +}; const int INVALID_FD = -1; constexpr const int32_t CONNECT_WAIT_TIME_S = 15; @@ -724,6 +729,13 @@ private: void ClearIncrementalStatFile(int32_t userId, const string &bundleName); BJsonCachedEntity CreateJsonEntity(UniqueFd &fd, vector &bundleInfos, const std::vector &bundleNames); + void SetBundleParam(const BJsonEntityCaps::BundleInfo &restoreInfo, std::string &bundleNameIndexInfo, + RestoreTypeEnum &restoreType); + void SetBroadCastInfoMap(const std::string &bundleName, + const std::map &broadCastInfoMap, + int userId); + void BroadCastRestore(const std::string &bundleName, const std::string &broadCastType); + void BroadCastSingle(const std::string &bundleName, const std::string &broadCastType); void TotalStart() { if (totalStatistic_ != nullptr) { @@ -794,6 +806,7 @@ private: std::shared_mutex statMapMutex_; std::map> saStatisticMap_; std::map> backupExtOnReleaseMap_; + std::map bundleBroadCastInfoMap_; public: std::map> backupExtMutexMap_; std::map failedBundles_; diff --git a/services/backup_sa/include/module_notify/notify_work_service.h b/services/backup_sa/include/module_notify/notify_work_service.h index c4bb9b749a14a798aaaeee3362c9bcd9b008b5d5..c27b1450342544eb3fdd4dc8ab39f228828c93df 100644 --- a/services/backup_sa/include/module_notify/notify_work_service.h +++ b/services/backup_sa/include/module_notify/notify_work_service.h @@ -22,10 +22,16 @@ #include "b_jsonutil/b_jsonutil.h" namespace OHOS::FileManagement::Backup { + +enum BroadCastType { + START_TYPE = 0, + END_TYPE = 1, +}; + class NotifyWorkService final : public NoCopyable { DECLARE_DELAYED_SINGLETON(NotifyWorkService); public: - bool NotifyBundleDetail(BJsonUtil::BundleDetailInfo bundleDetailInfo); + bool NotifyBundleDetail(BJsonUtil::BundleDetailInfo bundleDetailInfo, BroadCastType type); }; } // namespace OHOS::FileManagement::Backup diff --git a/services/backup_sa/src/module_ipc/service.cpp b/services/backup_sa/src/module_ipc/service.cpp index 44ce7919cc5cd7bee467767325f96e7271b65fc3..83935b6423bf447d6d79c6bf006338d533ef5c76 100644 --- a/services/backup_sa/src/module_ipc/service.cpp +++ b/services/backup_sa/src/module_ipc/service.cpp @@ -840,27 +840,26 @@ void Service::SetCurrentSessProperties( session_->RemoveExtInfo(bundleNameIndexInfo); continue; } - session_->SetBundleRestoreType(bundleNameIndexInfo, restoreType); - session_->SetBundleVersionCode(bundleNameIndexInfo, restoreInfo.versionCode); - session_->SetBundleVersionName(bundleNameIndexInfo, restoreInfo.versionName); - session_->SetBundleDataSize(bundleNameIndexInfo, restoreInfo.spaceOccupied); - session_->SetBundleUserId(bundleNameIndexInfo, session_->GetSessionUserId()); + SetBundleParam(restoreInfo, bundleNameIndexInfo, restoreType); auto iter = isClearDataFlags.find(bundleNameIndexInfo); if (iter != isClearDataFlags.end()) { session_->SetClearDataFlag(bundleNameIndexInfo, iter->second); } BJsonUtil::BundleDetailInfo broadCastInfo; BJsonUtil::BundleDetailInfo uniCastInfo; - if (BJsonUtil::FindBundleInfoByName(bundleNameDetailMap, bundleNameIndexInfo, BROADCAST_TYPE, broadCastInfo)) { - bool notifyRet = DelayedSingleton::GetInstance()->NotifyBundleDetail(broadCastInfo); + std::map broadCastInfoMap; + if (BJsonUtil::FindBroadCastInfoByName(bundleNameDetailMap, bundleNameIndexInfo, + BROADCAST_TYPE, broadCastInfoMap)) { + SetBroadCastInfoMap(bundleNameIndexInfo, broadCastInfoMap, session_->GetSessionUserId()); + BroadCastRestore(bundleNameIndexInfo, BConstants::BROADCAST_RESTORE_START); + } else if (BJsonUtil::FindBundleInfoByName(bundleNameDetailMap, bundleNameIndexInfo, BROADCAST_TYPE, broadCastInfo)) { + bool notifyRet = DelayedSingleton::GetInstance()->NotifyBundleDetail(broadCastInfo, START_TYPE); HILOGI("Publish event end, notify result is:%{public}d", notifyRet); } if (BJsonUtil::FindBundleInfoByName(bundleNameDetailMap, bundleNameIndexInfo, UNICAST_TYPE, uniCastInfo)) { HILOGI("current bundle, unicast info:%{public}s", GetAnonyString(uniCastInfo.detail).c_str()); session_->SetBackupExtInfo(bundleNameIndexInfo, uniCastInfo.detail); } - session_->SetBackupExtName(bundleNameIndexInfo, restoreInfo.extensionName); - session_->SetIsReadyLaunch(bundleNameIndexInfo); } HILOGI("End"); } @@ -1507,6 +1506,7 @@ void Service::SessionDeactive() return; } ErrCode ret = BError(BError::Codes::OK); + BroadCastRestore(BConstants::BROADCAST_RELEASE_BUNDLES, BConstants::BROADCAST_RESTORE_END); std::vector bundleNameList; if (session_->GetScenario() == IServiceReverseType::Scenario::RESTORE && session_->CleanAndCheckIfNeedWait(ret, bundleNameList)) { @@ -2091,4 +2091,15 @@ void Service::SetUserIdAndRestoreType(RestoreTypeEnum restoreType, int32_t userI session_->SetSessionUserId(GetUserIdDefault()); } } + +void Service::SetBundleParam(const BJsonEntityCaps::BundleInfo &restoreInfo, std::string &bundleNameIndexInfo, + RestoreTypeEnum &restoreType) +{ + session_->SetBundleRestoreType(bundleNameIndexInfo, restoreType); + session_->SetBundleVersionCode(bundleNameIndexInfo, restoreInfo.versionCode); + session_->SetBundleVersionName(bundleNameIndexInfo, restoreInfo.versionName); + session_->SetBundleDataSize(bundleNameIndexInfo, restoreInfo.spaceOccupied); + session_->SetBackupExtName(bundleNameIndexInfo, restoreInfo.extensionName); + session_->SetIsReadyLaunch(bundleNameIndexInfo); +} } // namespace OHOS::FileManagement::Backup diff --git a/services/backup_sa/src/module_ipc/service_incremental.cpp b/services/backup_sa/src/module_ipc/service_incremental.cpp index 1b478b1030ed8bdf91951a0255e324994def8597..22c1e088694a4ec4d6d40661e6cca24fae9b2dee 100644 --- a/services/backup_sa/src/module_ipc/service_incremental.cpp +++ b/services/backup_sa/src/module_ipc/service_incremental.cpp @@ -51,6 +51,7 @@ #include "module_external/bms_adapter.h" #include "module_ipc/svc_backup_connection.h" #include "module_ipc/svc_restore_deps_manager.h" +#include "module_notify/notify_work_service.h" #include "parameter.h" #include "system_ability_definition.h" #include "hitrace_meter.h" @@ -1107,6 +1108,7 @@ ErrCode Service::Cancel(const std::string& bundleName, int32_t &result) HILOGE("Verify caller failed, bundleName:%{public}s, scenario:%{public}d", bundleName.c_str(), scenario); return BError(BError::BackupErrorCode::E_CANCEL_UNSTARTED_TASK); } + BroadCastRestore(bundleName, BConstants::BROADCAST_RESTORE_END); auto impl = session_->GetImpl(); auto it = impl.backupExtNameMap.find(bundleName); if (it == impl.backupExtNameMap.end()) { diff --git a/services/backup_sa/src/module_ipc/sub_service.cpp b/services/backup_sa/src/module_ipc/sub_service.cpp index 51a6b972bb88286a258c1bba61553a9b59a01f88..8cbe3eb2f2d6e69ecdcb871f3db90479bab92e90 100644 --- a/services/backup_sa/src/module_ipc/sub_service.cpp +++ b/services/backup_sa/src/module_ipc/sub_service.cpp @@ -1607,4 +1607,61 @@ void Service::DoNoticeClientFinish(const std::string &bundleName, ErrCode errCod NoticeClientFinish(bundleName, errCode); } } + +void Service::SetBroadCastInfoMap(const std::string &bundleName, + const std::map &broadCastInfoMap, + int userId) +{ + if (bundleName == "") { + HILOGE("bundleName empty!"); + return; + } + bundleBroadCastInfoMap_[bundleName].broadCastInfoMap = broadCastInfoMap; + bundleBroadCastInfoMap_[bundleName].userId = userId; + return; +} + +void Service::BroadCastRestore(const std::string &bundleName, const std::string &broadCastType) +{ + if (bundleBroadCastInfoMap_.empty()) { + HILOGD("bundleBroadCastInfoMap_ empty, BroadCastRestore fail"); + return; + } + if (bundleName == BConstants::BROADCAST_RELEASE_BUNDLES && + session_->GetScenario() == IServiceReverseType::Scenario::RESTORE) { + for (auto item : bundleBroadCastInfoMap_) { + BroadCastSingle(item.first, broadCastType); + } + return; + } + if (bundleBroadCastInfoMap_.count(bundleName) == 0) { + HILOGE("%{public}s not found in bundleBroadCastInfoMap_", bundleName.c_str()); + return; + } + BroadCastSingle(bundleName, broadCastType); + return; +} + +void Service::BroadCastSingle(const std::string &bundleName, const std::string &broadCastType) +{ + std::map broadCastInfoMap; + broadCastInfoMap = bundleBroadCastInfoMap_[bundleName].broadCastInfoMap; + if (broadCastInfoMap.count(broadCastType) && session_->GetScenario() == IServiceReverseType::Scenario::RESTORE) { + // 分身应用 + BJsonUtil::BundleDetailInfo broadCastInfo = BJsonUtil::ParseBundleNameIndexStr(bundleName); + broadCastInfo.bundleName = broadCastInfo.bundleName; + broadCastInfo.userId = bundleBroadCastInfoMap_[bundleName].userId; + broadCastInfo.bundleIndex = broadCastInfo.bundleIndex; + broadCastInfo.detail = broadCastInfoMap[broadCastType]; + bool notifyRet; + if (broadCastType == BConstants::BROADCAST_RESTORE_START) { + notifyRet = DelayedSingleton::GetInstance()->NotifyBundleDetail( + broadCastInfo, START_TYPE); + } else { + notifyRet = DelayedSingleton::GetInstance()->NotifyBundleDetail( + broadCastInfo, END_TYPE); + } + HILOGI("Publish event end, notify result is:%{public}d, broadCastType:%{public}s", notifyRet, broadCastType.c_str()); + } +} } \ No newline at end of file diff --git a/services/backup_sa/src/module_notify/notify_work_service.cpp b/services/backup_sa/src/module_notify/notify_work_service.cpp index f9e403a22aaab708a59611f62b04bd40ca429da3..b43838da072ee576fceb6f04d73fac5f12546e1c 100644 --- a/services/backup_sa/src/module_notify/notify_work_service.cpp +++ b/services/backup_sa/src/module_notify/notify_work_service.cpp @@ -28,7 +28,7 @@ namespace OHOS::FileManagement::Backup { NotifyWorkService::NotifyWorkService() {} NotifyWorkService::~NotifyWorkService() {} -bool NotifyWorkService::NotifyBundleDetail(BJsonUtil::BundleDetailInfo bundleDetailInfo) +bool NotifyWorkService::NotifyBundleDetail(BJsonUtil::BundleDetailInfo bundleDetailInfo, BroadCastType type) { AAFwk::Want want; std::string bundleName = bundleDetailInfo.bundleName; @@ -40,7 +40,11 @@ bool NotifyWorkService::NotifyBundleDetail(BJsonUtil::BundleDetailInfo bundleDet want.SetParam("userId", bundleDetailInfo.userId); want.SetParam("index", bundleDetailInfo.bundleIndex); want.SetParam("detail", bundleDetail); - want.SetAction(EventFwk::CommonEventSupport::COMMON_EVENT_RESTORE_START); + if (type == END_TYPE) { + want.SetAction(EventFwk::CommonEventSupport::COMMON_EVENT_RESTORE_END); + } else { + want.SetAction(EventFwk::CommonEventSupport::COMMON_EVENT_RESTORE_START); + } EventFwk::CommonEventData commonData {want}; HILOGI("End publish event, bundleName is: %{public}s", bundleName.c_str()); return EventFwk::CommonEventManager::PublishCommonEvent(commonData); diff --git a/tests/mock/module_ipc/include/notify_work_service_mock.h b/tests/mock/module_ipc/include/notify_work_service_mock.h index 522a08e7cc36ff248c59cdf300f78014a87d9f87..de46c859e978a19d7c640d1a2e583e835ea1011d 100644 --- a/tests/mock/module_ipc/include/notify_work_service_mock.h +++ b/tests/mock/module_ipc/include/notify_work_service_mock.h @@ -18,12 +18,12 @@ #include -#include "notify_work_service.h" +#include "module_notify/notify_work_service.h" namespace OHOS::FileManagement::Backup { class BNotifyWorkService { public: - virtual bool NotifyBundleDetail(BJsonUtil::BundleDetailInfo) = 0; + virtual bool NotifyBundleDetail(BJsonUtil::BundleDetailInfo, BroadCastType type) = 0; public: BNotifyWorkService() = default; virtual ~BNotifyWorkService() = default; @@ -33,7 +33,7 @@ public: class NotifyWorkServiceMock : public BNotifyWorkService { public: - MOCK_METHOD(bool, NotifyBundleDetail, (BJsonUtil::BundleDetailInfo)); + MOCK_METHOD(bool, NotifyBundleDetail, (BJsonUtil::BundleDetailInfo, BroadCastType)); }; } // namespace OHOS::FileManagement::Backup #endif // OHOS_FILEMGMT_BACKUP_NOTIFY_WORK_SERVICE_MOCK_H \ No newline at end of file diff --git a/tests/mock/module_ipc/service_mock.cpp b/tests/mock/module_ipc/service_mock.cpp index 735762b1801a06d38beb540225e0ea7946de1b8d..ce6398b50a1297196f712b429f1bf3fa08cb122c 100644 --- a/tests/mock/module_ipc/service_mock.cpp +++ b/tests/mock/module_ipc/service_mock.cpp @@ -458,4 +458,12 @@ ErrCode Service::GetCompatibilityInfo(const std::string &bundleName, const std:: } void Service::DoNoticeClientFinish(const std::string &bundleName, ErrCode errCode, bool isRestoreEnd) {} + +void Service::SetBroadCastInfoMap(const std::string &bundleName, + const std::map &broadCastInfoMap, + int userId) {} + +void Service::BroadCastRestore(const std::string &bundleName, const std::string &broadCastType) {} + +void Service::BroadCastSingle(const std::string &bundleName, const std::string &broadCastType) {} } // namespace OHOS::FileManagement::Backup diff --git a/tests/mock/module_ipc/src/notify_work_service_mock.cpp b/tests/mock/module_ipc/src/notify_work_service_mock.cpp index e802517a617dc3639f46164f111ab840117c7d08..84588312e1b8e6525da29e09ca947f336be315ec 100644 --- a/tests/mock/module_ipc/src/notify_work_service_mock.cpp +++ b/tests/mock/module_ipc/src/notify_work_service_mock.cpp @@ -22,8 +22,8 @@ NotifyWorkService::NotifyWorkService() {} NotifyWorkService::~NotifyWorkService() {} -bool NotifyWorkService::NotifyBundleDetail(BJsonUtil::BundleDetailInfo bundleDetailInfo) +bool NotifyWorkService::NotifyBundleDetail(BJsonUtil::BundleDetailInfo bundleDetailInfo, BroadCastType type) { - return BNotifyWorkService::notify->NotifyBundleDetail(bundleDetailInfo); + return BNotifyWorkService::notify->NotifyBundleDetail(bundleDetailInfo, type); } } // namespace OHOS::FileManagement::Backup \ No newline at end of file diff --git a/tests/unittests/backup_sa/module_ipc/service_incremental_test.cpp b/tests/unittests/backup_sa/module_ipc/service_incremental_test.cpp index 9111b9b552c389d8890f6eeb0121f41f4621048a..450a6da0632eb204f36f67848bdd8ce3dd13e5fb 100644 --- a/tests/unittests/backup_sa/module_ipc/service_incremental_test.cpp +++ b/tests/unittests/backup_sa/module_ipc/service_incremental_test.cpp @@ -84,6 +84,11 @@ public: virtual void SetExtOnRelease(const BundleName&, bool) = 0; virtual void RemoveExtOnRelease(const BundleName&) = 0; virtual ErrCode GetCompatibilityInfo(const std::string&, const std::string&, std::string&) = 0; + virtual void SetBroadCastInfoMap(const std::string &bundleName, + const std::map &broadCastInfoMap, + int userId) = 0; + virtual void BroadCastRestore(const std::string &bundleName, const std::string &broadCastType) = 0; + virtual void BroadCastSingle(const std::string &bundleName, const std::string &broadCastType) = 0; public: virtual bool UpdateToRestoreBundleMap(const string&, const string&) = 0; public: @@ -145,6 +150,9 @@ public: MOCK_METHOD(void, SetExtOnRelease, (const BundleName&, bool)); MOCK_METHOD(void, RemoveExtOnRelease, (const BundleName&)); MOCK_METHOD(ErrCode, GetCompatibilityInfo, (const std::string&, const std::string&, std::string&)); + MOCK_METHOD(void, SetBroadCastInfoMap, (const std::string &, (const std::map &), int)); + MOCK_METHOD(void, BroadCastRestore, (const std::string &, const std::string &)); + MOCK_METHOD(void, BroadCastSingle, (const std::string &, const std::string &)); public: MOCK_METHOD(bool, UpdateToRestoreBundleMap, (const string&, const string&)); }; @@ -488,6 +496,21 @@ ErrCode Service::GetCompatibilityInfo(const std::string &bundleName, const std:: { return BService::serviceMock->GetCompatibilityInfo(bundleName, extInfo, compatInfo); } + +void SetBroadCastInfoMap(const std::string &bundleName, + const std::map &broadCastInfoMap, + int userId) +{ + BService::serviceMock->SetBroadCastInfoMap(bundleName, broadCastInfoMap, userId); +} +void BroadCastRestore(const std::string &bundleName, const std::string &broadCastType) +{ + BService::serviceMock->BroadCastRestore(bundleName, broadCastType); +} +void BroadCastSingle(const std::string &bundleName, const std::string &broadCastType) +{ + BService::serviceMock->BroadCastSingle(bundleName, broadCastType); +} } // namespace OHOS::FileManagement::Backup namespace OHOS::FileManagement::Backup { diff --git a/tests/unittests/backup_sa/module_ipc/service_other_test.cpp b/tests/unittests/backup_sa/module_ipc/service_other_test.cpp index 5cace8b41a7bbf5b5ce02fb5b1ff18e46566633d..023da0a568c935a1fc9b8287941ed63042e28e7a 100644 --- a/tests/unittests/backup_sa/module_ipc/service_other_test.cpp +++ b/tests/unittests/backup_sa/module_ipc/service_other_test.cpp @@ -1063,7 +1063,7 @@ HWTEST_F(ServiceTest, SUB_Service_SetCurrentSessProperties_0300, TestSize.Level1 EXPECT_CALL(*jsonUtil, BuildBundleNameIndexInfo(_, _)).WillOnce(Return("bundleName")) .WillOnce(Return("bundleName")); EXPECT_CALL(*jsonUtil, FindBundleInfoByName(_, _, _, _)).WillOnce(Return(true)).WillOnce(Return(false)); - EXPECT_CALL(*notify, NotifyBundleDetail(_)).WillOnce(Return(true)); + EXPECT_CALL(*notify, NotifyBundleDetail(_, _)).WillOnce(Return(true)); service->SetCurrentSessProperties(restoreBundleInfos, restoreBundleNames, bundleNameDetailMap, isClearDataFlags, restoreType, backupVersion); diff --git a/utils/include/b_jsonutil/b_jsonutil.h b/utils/include/b_jsonutil/b_jsonutil.h index 2e19abdca2bcd9474ee229fe81c1b7bc65206e43..e15583e894f766217770ce0a48cc7826d8ffc125 100644 --- a/utils/include/b_jsonutil/b_jsonutil.h +++ b/utils/include/b_jsonutil/b_jsonutil.h @@ -24,6 +24,7 @@ class BJsonUtil { public: typedef struct BundleDetailInfo { std::string backupScene; + std::string broadCastType; std::string bundleName; std::string type; std::string detail; @@ -201,6 +202,7 @@ public: size_t listSize, std::string scanning, std::string &jsonStr); + /** * @brief 通过bundlename找sceneId * @@ -212,6 +214,19 @@ public: */ static bool FindBackupSceneByName(std::map> &bundleNameDetailsMap, std::string &bundleName, std::string &backupScene); + + /** + * @brief 通过bundlename找BroadCastInfo + * + * @param bundleNameDetailsMap 包名和当前包扩展信息解析结果的集合 + * @param bundleName 包名 + * @param jobType 业务类型broadcast或者unicast + * @param broadCastInfoMap 存储broadCastInfoMap的变量 + * + * @return 是否成功 + */ + static bool FindBroadCastInfoByName(std::map> &bundleNameDetailsMap, + std::string &bundleName, const std::string &jobType, std::map &broadCastInfoMap); }; } // namespace OHOS::FileManagement::Backup diff --git a/utils/include/b_resources/b_constants.h b/utils/include/b_resources/b_constants.h index f78eaf4cc8fd3027c229069777929ef2f66c2bcd..68d6bff29558ece864e846328a578c12b44c941c 100644 --- a/utils/include/b_resources/b_constants.h +++ b/utils/include/b_resources/b_constants.h @@ -215,6 +215,9 @@ static inline std::string BACKUP_SCENE = "backupScene"; static inline std::string OPTION_DIR = "optionDir"; static inline std::string INCLUDES = "includes"; static inline std::string EXCLUDES = "excludes"; +static inline std::string BROADCAST_RESTORE_START = "restore_start"; +static inline std::string BROADCAST_RESTORE_END = "restore_end"; +static inline std::string BROADCAST_RELEASE_BUNDLES = "release_bundles"; static inline int DEFAULT_APPINDEX = 0; // 特殊版本信息 @@ -254,6 +257,7 @@ static inline std::string PRIORITY = "priority"; // unicast const std::string UNICAST_TYPE = "unicast"; +const std::string BROADCAST_TYPE = "broadcast"; // 雷达打点引用到的常量 constexpr int32_t MS_1000 = 1000; diff --git a/utils/src/b_jsonutil/b_jsonutil.cpp b/utils/src/b_jsonutil/b_jsonutil.cpp index ce3c1a8890d48c3d99a7ef74664d72e219776249..a4dd4583d389ec1b31f0356a20ab0d290dd11665 100644 --- a/utils/src/b_jsonutil/b_jsonutil.cpp +++ b/utils/src/b_jsonutil/b_jsonutil.cpp @@ -221,6 +221,13 @@ static void InsertBundleDetailInfo(cJSON *infos, int infosCount, } char *detailInfos = cJSON_Print(details); bundleDetailInfo.detail = std::string(detailInfos); + if (bundleDetailInfo.type.compare(BConstants::BROADCAST_TYPE) == 0) { + cJSON *broadCastType = cJSON_GetObjectItem(infoItem, "broadcastType"); + if (broadCastType != nullptr && cJSON_IsString(broadCastType) && (broadCastType->valuestring != nullptr)) { + HILOGI("Parse broadCastType success"); + bundleDetailInfo.broadCastType = broadCastType->valuestring; + } + } bundleDetails.emplace_back(bundleDetailInfo); cJSON_free(detailInfos); } @@ -555,4 +562,23 @@ bool BJsonUtil::FindBackupSceneByName(std::map> &bundleNameDetailsMap, + std::string &bundleName, const std::string &jobType, std::map &broadCastInfoMap) +{ + auto iter = bundleNameDetailsMap.find(bundleName); + if (iter == bundleNameDetailsMap.end()) { + return false; + } + std::vector bundleDetailInfos = iter->second; + for (const auto &bundleDetailInfo : bundleDetailInfos) { + if (bundleDetailInfo.type == jobType && bundleDetailInfo.broadCastType != "") { + broadCastInfoMap[bundleDetailInfo.broadCastType] = bundleDetailInfo.detail; + } + } + if (broadCastInfoMap.empty()) { + return false; + } + return true; +} } \ No newline at end of file