1 /*
2 * Copyright (c) 2025 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include "form_refresh/strategy/refresh_exec_mgr.h"
17
18 #include "form_provider/form_provider_mgr.h"
19 #include "form_render/form_render_mgr.h"
20 #include "fms_log_wrapper.h"
21
22 namespace OHOS {
23 namespace AppExecFwk {
24
AskForProviderData(const int64_t formId,const FormRecord & record,const Want & want)25 ErrCode RefreshExecMgr::AskForProviderData(const int64_t formId, const FormRecord &record, const Want &want)
26 {
27 HILOG_INFO("call, formId:%{public} " PRId64, formId);
28 return FormProviderMgr::GetInstance().ConnectAmsForRefresh(formId, record, want);
29 }
30
UpdateByProviderData(const int64_t formId,const FormProviderData & formProviderData,bool mergeData)31 ErrCode RefreshExecMgr::UpdateByProviderData(
32 const int64_t formId, const FormProviderData &formProviderData, bool mergeData)
33 {
34 HILOG_INFO("call, formId:%{public} " PRId64, formId);
35 WantParams wantParams;
36 return FormRenderMgr::GetInstance().UpdateRenderingForm(formId, formProviderData, wantParams, mergeData);
37 }
38
39 } // namespace AppExecFwk
40 } // namespace OHOS