From 7bc617e6aa320a62d9cd4038f9e0fca179aabeb3 Mon Sep 17 00:00:00 2001 From: zhushupei Date: Thu, 15 May 2025 14:41:30 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=9B=9E=E6=94=B6=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E9=94=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhushupei --- services/include/common/util/form_trust_mgr.h | 2 +- services/include/data_center/form_cache_mgr.h | 2 ++ .../include/status_mgr_center/form_task_mgr.h | 12 +++++++ services/src/common/util/form_trust_mgr.cpp | 4 +-- services/src/data_center/form_cache_mgr.cpp | 16 ++++++++-- .../form_provider/form_supply_callback.cpp | 11 ++----- .../src/status_mgr_center/form_task_mgr.cpp | 32 +++++++++---------- 7 files changed, 48 insertions(+), 31 deletions(-) diff --git a/services/include/common/util/form_trust_mgr.h b/services/include/common/util/form_trust_mgr.h index 6626c233f4..51747de729 100644 --- a/services/include/common/util/form_trust_mgr.h +++ b/services/include/common/util/form_trust_mgr.h @@ -57,7 +57,7 @@ public: void GetUntrustAppNameList(std::string &result); private: std::map unTrustList_; - mutable std::mutex rdbStoreMutex_; + mutable std::mutex trustListMutex_; }; } // namespace AppExecFwk } // namespace OHOS diff --git a/services/include/data_center/form_cache_mgr.h b/services/include/data_center/form_cache_mgr.h index 5744be1110..a2f9c566a2 100644 --- a/services/include/data_center/form_cache_mgr.h +++ b/services/include/data_center/form_cache_mgr.h @@ -75,6 +75,8 @@ private: void ResetCacheStateAfterReboot(); mutable std::mutex cacheMutex_; + mutable std::mutex formCacheMutex_; + mutable std::mutex imgCacheMutex_; }; } // namespace AppExecFwk } // namespace OHOS diff --git a/services/include/status_mgr_center/form_task_mgr.h b/services/include/status_mgr_center/form_task_mgr.h index 46af207a47..5907feba59 100644 --- a/services/include/status_mgr_center/form_task_mgr.h +++ b/services/include/status_mgr_center/form_task_mgr.h @@ -629,6 +629,18 @@ private: void InnerPostRenderForm(const FormRecord &formRecord, const Want &want, const sptr &remoteObject); + + /** + * @brief remove form last revocer time + * @param formId The Id of the form. + */ + void RemoveLastRecoverTimesByFormId(const int64_t formId); + + /** + * @brief update form last revocer time + * @param formId The Id of the form. + */ + void UpdateFormLastRecoverTimes(const int64_t formId); private: std::mutex formRecoverTimesMutex_; std::unordered_map formLastRecoverTimes; diff --git a/services/src/common/util/form_trust_mgr.cpp b/services/src/common/util/form_trust_mgr.cpp index d63680fa84..4664f89b8a 100644 --- a/services/src/common/util/form_trust_mgr.cpp +++ b/services/src/common/util/form_trust_mgr.cpp @@ -44,7 +44,7 @@ FormTrustMgr::~FormTrustMgr() bool FormTrustMgr::IsTrust(const std::string &bundleName) { - std::lock_guard lock(rdbStoreMutex_); + std::lock_guard lock(trustListMutex_); auto iter = unTrustList_.find(bundleName); if (iter == unTrustList_.end()) { return true; @@ -67,7 +67,7 @@ void FormTrustMgr::GetUntrustAppNameList(std::string &result) void FormTrustMgr::MarkTrustFlag(const std::string &bundleName, bool isTrust) { - std::lock_guard lock(rdbStoreMutex_); + std::lock_guard lock(trustListMutex_); auto iter = unTrustList_.find(bundleName); if (isTrust && iter != unTrustList_.end()) { auto ret = FormRdbDataMgr::GetInstance().DeleteData(UNTRUST_LIST, bundleName); diff --git a/services/src/data_center/form_cache_mgr.cpp b/services/src/data_center/form_cache_mgr.cpp index 472dcedde3..294b11b3bd 100644 --- a/services/src/data_center/form_cache_mgr.cpp +++ b/services/src/data_center/form_cache_mgr.cpp @@ -386,7 +386,11 @@ bool FormCacheMgr::GetDataCacheFromDb(int64_t formId, FormCache &formCache) cons { NativeRdb::AbsRdbPredicates absRdbPredicates(FORM_CACHE_TABLE); absRdbPredicates.EqualTo(FORM_ID, std::to_string(formId)); - auto absSharedResultSet = FormRdbDataMgr::GetInstance().QueryData(absRdbPredicates); + std::shared_ptr absSharedResultSet = nullptr; + { + std::lock_guard lock(formCacheMutex_); + absSharedResultSet = FormRdbDataMgr::GetInstance().QueryData(absRdbPredicates); + } if (absSharedResultSet == nullptr) { HILOG_ERROR("GetDataCacheFromDb failed"); return false; @@ -445,6 +449,7 @@ bool FormCacheMgr::SaveDataCacheToDb(int64_t formId, const FormCache &formCache) bool FormCacheMgr::DeleteDataCacheInDb(int64_t formId) { + std::lock_guard lock(formCacheMutex_); NativeRdb::AbsRdbPredicates absRdbPredicates(FORM_CACHE_TABLE); absRdbPredicates.EqualTo(FORM_ID, std::to_string(formId)); return FormRdbDataMgr::GetInstance().DeleteData(absRdbPredicates); @@ -455,7 +460,12 @@ bool FormCacheMgr::GetImgCacheFromDb( { NativeRdb::AbsRdbPredicates absRdbPredicates(IMG_CACHE_TABLE); absRdbPredicates.EqualTo(IMAGE_ID, std::to_string(rowId)); - auto absSharedResultSet = FormRdbDataMgr::GetInstance().QueryData(absRdbPredicates); + std::shared_ptr absSharedResultSet = nullptr; + { + std::lock_guard lock(imgCacheMutex_); + absSharedResultSet = FormRdbDataMgr::GetInstance().QueryData(absRdbPredicates); + } + if (absSharedResultSet == nullptr) { HILOG_ERROR("GetImgCacheFromDb failed"); return false; @@ -510,7 +520,7 @@ bool FormCacheMgr::DeleteImgCacheInDb(const std::string &rowId) if (rowId.empty()) { return false; } - + std::lock_guard lock(imgCacheMutex_); NativeRdb::AbsRdbPredicates absRdbPredicates(IMG_CACHE_TABLE); absRdbPredicates.EqualTo(IMAGE_ID, rowId); return FormRdbDataMgr::GetInstance().DeleteData(absRdbPredicates); diff --git a/services/src/form_provider/form_supply_callback.cpp b/services/src/form_provider/form_supply_callback.cpp index a789ed8f73..1b8ef41f2e 100644 --- a/services/src/form_provider/form_supply_callback.cpp +++ b/services/src/form_provider/form_supply_callback.cpp @@ -360,17 +360,10 @@ int32_t FormSupplyCallback::OnRecycleForm(const int64_t &formId, const Want &wan return ERR_APPEXECFWK_FORM_COMMON_CODE; } - FormRecord formRecord; - if (!FormDataMgr::GetInstance().GetFormRecord(formId, formRecord)) { - HILOG_WARN("form %{public}" PRId64 " not exist", formId); + if (!FormDataMgr::GetInstance().UpdateFormRecordRecycleStatusToRecycled(formId)) { + HILOG_ERROR("update recycle status data of %{public}" PRId64 " failed", formId); return ERR_APPEXECFWK_FORM_COMMON_CODE; } - if (formRecord.recycleStatus != RecycleStatus::RECYCLABLE) { - HILOG_WARN("form %{public}" PRId64 " not RECYCLABLE", formId); - return ERR_APPEXECFWK_FORM_COMMON_CODE; - } - formRecord.recycleStatus = RecycleStatus::RECYCLED; - FormDataMgr::GetInstance().UpdateFormRecord(formId, formRecord); sptr remoteObjectOfHost = want.GetRemoteObject(Constants::PARAM_FORM_HOST_TOKEN); if (remoteObjectOfHost == nullptr) { diff --git a/services/src/status_mgr_center/form_task_mgr.cpp b/services/src/status_mgr_center/form_task_mgr.cpp index 9bfe98bdee..006d40f435 100644 --- a/services/src/status_mgr_center/form_task_mgr.cpp +++ b/services/src/status_mgr_center/form_task_mgr.cpp @@ -947,10 +947,7 @@ void FormTaskMgr::PostStopRenderingForm( auto deleterenderForm = [formRecord, want, remoteObject]() { FormTaskMgr::GetInstance().StopRenderingForm(formRecord, want, remoteObject); }; - { - std::lock_guard lock(formRecoverTimesMutex_); - formLastRecoverTimes.erase(formId); - } + RemoveLastRecoverTimesByFormId(formId); FormCommand deleteCommand{ formId, std::make_pair(TaskCommandType::DELETE_FORM, formId), @@ -995,10 +992,7 @@ void FormTaskMgr::PostReleaseRenderer(int64_t formId, const std::string &compId, auto deleterenderForm = [formId, compId, uid, remoteObject]() { FormTaskMgr::GetInstance().ReleaseRenderer(formId, compId, uid, remoteObject); }; - { - std::lock_guard lock(formRecoverTimesMutex_); - formLastRecoverTimes.erase(formId); - } + RemoveLastRecoverTimesByFormId(formId); if (!isDynamic) { FormCommand deleteCommand{ formId, @@ -1260,10 +1254,7 @@ void FormTaskMgr::PostRecycleForms(const std::vector &formIds, const Wa auto recycleForm = [formId, remoteObjectOfHost, remoteObjectOfRender]() { FormTaskMgr::GetInstance().RecycleForm(formId, remoteObjectOfHost, remoteObjectOfRender); }; - { - std::lock_guard lock(formRecoverTimesMutex_); - formLastRecoverTimes.erase(formId); - } + RemoveLastRecoverTimesByFormId(formId); serialQueue_->ScheduleDelayTask( std::make_pair((int64_t)TaskType::RECYCLE_FORM, formId), delayTime, recycleForm); } @@ -1325,10 +1316,7 @@ void FormTaskMgr::PostRecoverForm(const FormRecord &record, const Want &want, co auto recoverForm = [record, want, remoteObject]() { FormTaskMgr::GetInstance().RecoverForm(record, want, remoteObject); }; - { - std::lock_guard lock(formRecoverTimesMutex_); - formLastRecoverTimes[formId] = FormUtil::GetCurrentMillisecond(); - } + UpdateFormLastRecoverTimes(formId); auto hostToken = want.GetRemoteObject(Constants::PARAM_FORM_HOST_TOKEN); FormCommand recoverCommand{ formId, @@ -1643,5 +1631,17 @@ void FormTaskMgr::PostDelayRefreshForms(const std::vector updatedFor serialQueue_->ScheduleTask(PROVIDER_UPDATE_REFRESH_FORMS_TASK_DELAY_TIME, delayRefreshForms); HILOG_INFO("end"); } + +void FormTaskMgr::RemoveLastRecoverTimesByFormId(const int64_t formId) +{ + std::lock_guard lock(formRecoverTimesMutex_); + formLastRecoverTimes.erase(formId); +} + +void FormTaskMgr::UpdateFormLastRecoverTimes(const int64_t formId) +{ + std::lock_guard lock(formRecoverTimesMutex_); + formLastRecoverTimes[formId] = FormUtil::GetCurrentMillisecond(); +} } // namespace AppExecFwk } // namespace OHOS -- Gitee From 543ceee199d57b7a1d4d2c5b05f8aab74e24d432 Mon Sep 17 00:00:00 2001 From: zhushupei Date: Thu, 15 May 2025 21:03:45 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=9B=9E=E6=94=B6=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E9=94=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhushupei --- services/include/data_center/form_data_mgr.h | 7 ++++++ services/src/data_center/form_data_mgr.cpp | 23 ++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/services/include/data_center/form_data_mgr.h b/services/include/data_center/form_data_mgr.h index a74740b80e..2ca650f5be 100644 --- a/services/include/data_center/form_data_mgr.h +++ b/services/include/data_center/form_data_mgr.h @@ -1014,6 +1014,13 @@ private: bool GetAbilityFormInfo(const FormRecord &record, const std::vector &abilities, AbilityFormInfo &abilityFormInfo); + /** + * @brief update formRecord recycle status to recycled. + * @param formId form id. + * @return Returns true on success, false on failure. + */ + bool UpdateFormRecordRecycleStatusToRecycled(const int64_t formId); + private: void GetUnusedFormInstancesByFilter( const FormInstancesFilter &formInstancesFilter, std::vector &formInstances); diff --git a/services/src/data_center/form_data_mgr.cpp b/services/src/data_center/form_data_mgr.cpp index c307568869..9b23d020dd 100644 --- a/services/src/data_center/form_data_mgr.cpp +++ b/services/src/data_center/form_data_mgr.cpp @@ -2975,6 +2975,29 @@ void FormDataMgr::UpdateFormWant(const int64_t formId, const Want &want, FormRec record.wantCacheMap[formId] = want; } +/** + * @brief update formRecord recycle status to recycled. + * @param formId form id. + * @return Returns true on success, false on failure. + */ +bool FormDataMgr::UpdateFormRecordRecycleStatusToRecycled(const int64_t formId) +{ + HILOG_DEBUG("get form record by formId"); + std::lock_guard lock(formRecordMutex_); + auto info = formRecords_.find(formId); + if (info == formRecords_.end()) { + HILOG_WARN("form %{public}" PRId64 " not exist", formId); + return false; + } + if (info->second.recycleStatus != RecycleStatus::RECYCLABLE) { + HILOG_WARN("form %{public}" PRId64 " not RECYCLABLE", formId); + return false; + } + info->second.recycleStatus = RecycleStatus::RECYCLED; + HILOG_DEBUG("get form record successfully"); + return true; +} + void FormDataMgr::GetFormRecordsByUserId(const int32_t userId, std::vector &formRecords) { std::lock_guard lock(formRecordMutex_); -- Gitee From 5ee5254cb8eb02ecb9a9ead413cf6437f688e872 Mon Sep 17 00:00:00 2001 From: zhushupei Date: Thu, 15 May 2025 21:35:56 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=9B=9E=E6=94=B6=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E9=94=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhushupei --- services/include/data_center/form_data_mgr.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/services/include/data_center/form_data_mgr.h b/services/include/data_center/form_data_mgr.h index 2ca650f5be..c5bfa30601 100644 --- a/services/include/data_center/form_data_mgr.h +++ b/services/include/data_center/form_data_mgr.h @@ -211,6 +211,14 @@ public: * @param formId The id of the form. * @param formHostObjs The form host remote object. */ + + /** + * @brief update formRecord recycle status to recycled. + * @param formId form id. + * @return Returns true on success, false on failure. + */ + bool UpdateFormRecordRecycleStatusToRecycled(const int64_t formId); + void GetFormHostRemoteObj(const int64_t formId, std::vector> &formHostObjs) const; /** * @brief Delete form host record. @@ -1014,13 +1022,6 @@ private: bool GetAbilityFormInfo(const FormRecord &record, const std::vector &abilities, AbilityFormInfo &abilityFormInfo); - /** - * @brief update formRecord recycle status to recycled. - * @param formId form id. - * @return Returns true on success, false on failure. - */ - bool UpdateFormRecordRecycleStatusToRecycled(const int64_t formId); - private: void GetUnusedFormInstancesByFilter( const FormInstancesFilter &formInstancesFilter, std::vector &formInstances); -- Gitee From e65bd65686f6f966ce8dc24442735589ae746578 Mon Sep 17 00:00:00 2001 From: zhushupei Date: Mon, 19 May 2025 20:29:16 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=9B=9E=E6=94=B6=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E9=94=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhushupei --- services/include/common/util/form_trust_mgr.h | 2 +- services/include/data_center/form_cache_mgr.h | 2 -- services/include/data_center/form_data_mgr.h | 2 +- services/src/common/util/form_trust_mgr.cpp | 4 ++-- services/src/data_center/form_cache_mgr.cpp | 14 ++------------ services/src/data_center/form_data_mgr.cpp | 6 +++--- .../src/form_provider/form_supply_callback.cpp | 2 +- 7 files changed, 10 insertions(+), 22 deletions(-) diff --git a/services/include/common/util/form_trust_mgr.h b/services/include/common/util/form_trust_mgr.h index 51747de729..e37771732f 100644 --- a/services/include/common/util/form_trust_mgr.h +++ b/services/include/common/util/form_trust_mgr.h @@ -57,7 +57,7 @@ public: void GetUntrustAppNameList(std::string &result); private: std::map unTrustList_; - mutable std::mutex trustListMutex_; + mutable std::mutex unTrustListMutex_; }; } // namespace AppExecFwk } // namespace OHOS diff --git a/services/include/data_center/form_cache_mgr.h b/services/include/data_center/form_cache_mgr.h index a2f9c566a2..5744be1110 100644 --- a/services/include/data_center/form_cache_mgr.h +++ b/services/include/data_center/form_cache_mgr.h @@ -75,8 +75,6 @@ private: void ResetCacheStateAfterReboot(); mutable std::mutex cacheMutex_; - mutable std::mutex formCacheMutex_; - mutable std::mutex imgCacheMutex_; }; } // namespace AppExecFwk } // namespace OHOS diff --git a/services/include/data_center/form_data_mgr.h b/services/include/data_center/form_data_mgr.h index c5bfa30601..2ba6f27c0c 100644 --- a/services/include/data_center/form_data_mgr.h +++ b/services/include/data_center/form_data_mgr.h @@ -217,7 +217,7 @@ public: * @param formId form id. * @return Returns true on success, false on failure. */ - bool UpdateFormRecordRecycleStatusToRecycled(const int64_t formId); + bool UpdateFormRecordRecycleStatus(const int64_t formId, const RecycleStatus status); void GetFormHostRemoteObj(const int64_t formId, std::vector> &formHostObjs) const; /** diff --git a/services/src/common/util/form_trust_mgr.cpp b/services/src/common/util/form_trust_mgr.cpp index 4664f89b8a..663821dfb2 100644 --- a/services/src/common/util/form_trust_mgr.cpp +++ b/services/src/common/util/form_trust_mgr.cpp @@ -44,7 +44,7 @@ FormTrustMgr::~FormTrustMgr() bool FormTrustMgr::IsTrust(const std::string &bundleName) { - std::lock_guard lock(trustListMutex_); + std::lock_guard lock(unTrustListMutex_); auto iter = unTrustList_.find(bundleName); if (iter == unTrustList_.end()) { return true; @@ -67,7 +67,7 @@ void FormTrustMgr::GetUntrustAppNameList(std::string &result) void FormTrustMgr::MarkTrustFlag(const std::string &bundleName, bool isTrust) { - std::lock_guard lock(trustListMutex_); + std::lock_guard lock(unTrustListMutex_); auto iter = unTrustList_.find(bundleName); if (isTrust && iter != unTrustList_.end()) { auto ret = FormRdbDataMgr::GetInstance().DeleteData(UNTRUST_LIST, bundleName); diff --git a/services/src/data_center/form_cache_mgr.cpp b/services/src/data_center/form_cache_mgr.cpp index 294b11b3bd..021f32139a 100644 --- a/services/src/data_center/form_cache_mgr.cpp +++ b/services/src/data_center/form_cache_mgr.cpp @@ -386,11 +386,7 @@ bool FormCacheMgr::GetDataCacheFromDb(int64_t formId, FormCache &formCache) cons { NativeRdb::AbsRdbPredicates absRdbPredicates(FORM_CACHE_TABLE); absRdbPredicates.EqualTo(FORM_ID, std::to_string(formId)); - std::shared_ptr absSharedResultSet = nullptr; - { - std::lock_guard lock(formCacheMutex_); - absSharedResultSet = FormRdbDataMgr::GetInstance().QueryData(absRdbPredicates); - } + auto absSharedResultSet = FormRdbDataMgr::GetInstance().QueryData(absRdbPredicates); if (absSharedResultSet == nullptr) { HILOG_ERROR("GetDataCacheFromDb failed"); return false; @@ -449,7 +445,6 @@ bool FormCacheMgr::SaveDataCacheToDb(int64_t formId, const FormCache &formCache) bool FormCacheMgr::DeleteDataCacheInDb(int64_t formId) { - std::lock_guard lock(formCacheMutex_); NativeRdb::AbsRdbPredicates absRdbPredicates(FORM_CACHE_TABLE); absRdbPredicates.EqualTo(FORM_ID, std::to_string(formId)); return FormRdbDataMgr::GetInstance().DeleteData(absRdbPredicates); @@ -460,11 +455,7 @@ bool FormCacheMgr::GetImgCacheFromDb( { NativeRdb::AbsRdbPredicates absRdbPredicates(IMG_CACHE_TABLE); absRdbPredicates.EqualTo(IMAGE_ID, std::to_string(rowId)); - std::shared_ptr absSharedResultSet = nullptr; - { - std::lock_guard lock(imgCacheMutex_); - absSharedResultSet = FormRdbDataMgr::GetInstance().QueryData(absRdbPredicates); - } + auto absSharedResultSet = FormRdbDataMgr::GetInstance().QueryData(absRdbPredicates); if (absSharedResultSet == nullptr) { HILOG_ERROR("GetImgCacheFromDb failed"); @@ -520,7 +511,6 @@ bool FormCacheMgr::DeleteImgCacheInDb(const std::string &rowId) if (rowId.empty()) { return false; } - std::lock_guard lock(imgCacheMutex_); NativeRdb::AbsRdbPredicates absRdbPredicates(IMG_CACHE_TABLE); absRdbPredicates.EqualTo(IMAGE_ID, rowId); return FormRdbDataMgr::GetInstance().DeleteData(absRdbPredicates); diff --git a/services/src/data_center/form_data_mgr.cpp b/services/src/data_center/form_data_mgr.cpp index 9b23d020dd..0a87e04112 100644 --- a/services/src/data_center/form_data_mgr.cpp +++ b/services/src/data_center/form_data_mgr.cpp @@ -2976,11 +2976,11 @@ void FormDataMgr::UpdateFormWant(const int64_t formId, const Want &want, FormRec } /** - * @brief update formRecord recycle status to recycled. + * @brief update formRecord recycle status. * @param formId form id. * @return Returns true on success, false on failure. */ -bool FormDataMgr::UpdateFormRecordRecycleStatusToRecycled(const int64_t formId) +bool FormDataMgr::UpdateFormRecordRecycleStatus(const int64_t formId, const RecycleStatus status) { HILOG_DEBUG("get form record by formId"); std::lock_guard lock(formRecordMutex_); @@ -2993,7 +2993,7 @@ bool FormDataMgr::UpdateFormRecordRecycleStatusToRecycled(const int64_t formId) HILOG_WARN("form %{public}" PRId64 " not RECYCLABLE", formId); return false; } - info->second.recycleStatus = RecycleStatus::RECYCLED; + info->second.recycleStatus = status; HILOG_DEBUG("get form record successfully"); return true; } diff --git a/services/src/form_provider/form_supply_callback.cpp b/services/src/form_provider/form_supply_callback.cpp index 1b8ef41f2e..a0e9d88d27 100644 --- a/services/src/form_provider/form_supply_callback.cpp +++ b/services/src/form_provider/form_supply_callback.cpp @@ -360,7 +360,7 @@ int32_t FormSupplyCallback::OnRecycleForm(const int64_t &formId, const Want &wan return ERR_APPEXECFWK_FORM_COMMON_CODE; } - if (!FormDataMgr::GetInstance().UpdateFormRecordRecycleStatusToRecycled(formId)) { + if (!FormDataMgr::GetInstance().UpdateFormRecordRecycleStatus(formId, RecycleStatus::RECYCLED)) { HILOG_ERROR("update recycle status data of %{public}" PRId64 " failed", formId); return ERR_APPEXECFWK_FORM_COMMON_CODE; } -- Gitee