diff --git a/services/bundlemgr/src/bundle_mgr_service_event_handler.cpp b/services/bundlemgr/src/bundle_mgr_service_event_handler.cpp index a05d40006e7a8ebfd00463c8db4ae8d56e2a8168..cf9242646d47a26952af961a98d7b6f538268ad3 100644 --- a/services/bundlemgr/src/bundle_mgr_service_event_handler.cpp +++ b/services/bundlemgr/src/bundle_mgr_service_event_handler.cpp @@ -127,6 +127,7 @@ constexpr const char* CODE_PROTECT_FLAG_CHECKED = "checked"; constexpr const char* KEY_STORAGE_SIZE = "storageSize"; constexpr const char* APPSPAWN_PRELOAD_ARKWEB_ENGINE = "const.startup.appspawn.preload.arkwebEngine"; constexpr int64_t TEN_MB = 1024 * 1024 * 10; //10MB +constexpr int32_t USER_ID_SIZE = 1; std::set installList_; std::set onDemandInstallList_; @@ -2135,6 +2136,11 @@ void BMSEventHandler::InnerProcessRebootBundleInstall( AddParseInfosToMap(bundleName, infos); auto mapIter = loadExistData_.find(bundleName); if (mapIter == loadExistData_.end()) { + if (scanPathIter.find(ServiceConstants::PRELOAD_APP_DIR) == 0 && + dataMgr->GetAllUser().size() > USER_ID_SIZE) { + LOG_NOFUNC_I(BMS_TAG_DEFAULT, "ota skip new preload app: %{public}s", scanPathIter.c_str()); + continue; + } LOG_NOFUNC_I(BMS_TAG_DEFAULT, "OTA Install new -n %{public}s by path:%{public}s", bundleName.c_str(), scanPathIter.c_str()); std::vector filePaths { scanPathIter };