diff --git a/frameworks/core/components/form/resource/form_manager_delegate.h b/frameworks/core/components/form/resource/form_manager_delegate.h index 762f9f6c769ac9a29b7460f5d4b94a7d9c7b1c30..d512e5f4ab67d12df1a9b3e0e04f64fa8591e292 100644 --- a/frameworks/core/components/form/resource/form_manager_delegate.h +++ b/frameworks/core/components/form/resource/form_manager_delegate.h @@ -43,6 +43,9 @@ class FormManagerDelegate : public FormManagerResource { DECLARE_ACE_TYPE(FormManagerDelegate, FormManagerResource); public: +#ifdef OHOS_STANDARD_SYSTEM + void SetParamForWant(const RequestFormInfo& info, const AppExecFwk::FormInfo& formInfo); +#endif using onFormAcquiredCallbackForJava = std::function; using OnFormUpdateCallbackForJava = std::function; @@ -193,7 +196,6 @@ private: std::vector> pointerEventCache_; NotifySurfaceChangeFailedRecord notifySurfaceChangeFailedRecord_; #ifdef OHOS_STANDARD_SYSTEM - void SetParamForWant(const RequestFormInfo& info, const AppExecFwk::FormInfo& formInfo); void OnRouterActionEvent(const std::string& action); void OnCallActionEvent(const std::string& action); int64_t runningCardId_ = -1; diff --git a/frameworks/core/components_ng/pattern/form/form_pattern.cpp b/frameworks/core/components_ng/pattern/form/form_pattern.cpp index fac5f4fcf345e230cb34bc2ae7e1d81993ffa578..7c1849d9d62e3be0f6de1f5dd26be1c4ea1e22ce 100644 --- a/frameworks/core/components_ng/pattern/form/form_pattern.cpp +++ b/frameworks/core/components_ng/pattern/form/form_pattern.cpp @@ -778,6 +778,13 @@ void FormPattern::AddFormComponentUI(bool isTransparencyEnabled, const RequestFo void FormPattern::UpdateFormComponent(const RequestFormInfo& info) { + if (formManagerBridge_) { +#if OHOS_STANDARD_SYSTEM + AppExecFwk::FormInfo formInfo; + FormManagerDelegate::GetFormInfo(info.bundleName, info.moduleName, info.cardName, formInfo); + formManagerBridge_->SetParamForWant(info, formInfo); +#endif + } auto host = GetHost(); CHECK_NULL_VOID(host); auto layoutProperty = host->GetLayoutProperty(); diff --git a/test/unittest/core/pattern/form/mock/mock_form_manager_delegate.cpp b/test/unittest/core/pattern/form/mock/mock_form_manager_delegate.cpp index 7ec839e26743b6d275ebe2d50dea9fe3dd2ac671..8c0be8af2e5dbcbd717e3ea6ec77f8f5a3839036 100644 --- a/test/unittest/core/pattern/form/mock/mock_form_manager_delegate.cpp +++ b/test/unittest/core/pattern/form/mock/mock_form_manager_delegate.cpp @@ -115,6 +115,8 @@ bool FormManagerDelegate::GetFormInfo(const std::string& bundleName, const std:: { return true; } + +void FormManagerDelegate::SetParamForWant(const RequestFormInfo& info, const AppExecFwk::FormInfo& formInfo) {} #endif bool FormManagerDelegate::CheckFormBundleForbidden(const std::string& bundleName)