• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 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 "adapter/preview/entrance/ui_content_impl.h"
17 
18 #include <ui/rs_surface_node.h>
19 #include <ui/rs_ui_director.h>
20 
21 #include "include/core/SkFontMgr.h"
22 
23 #include "adapter/ohos/entrance/ace_new_pipe_judgement.h"
24 #include "adapter/ohos/entrance/platform_event_callback.h"
25 #include "adapter/preview/entrance/ace_application_info.h"
26 #include "adapter/preview/entrance/ace_container.h"
27 #include "adapter/preview/entrance/clipboard/clipboard_impl.h"
28 #include "adapter/preview/entrance/clipboard/clipboard_proxy_impl.h"
29 #include "adapter/preview/entrance/event_dispatcher.h"
30 #include "adapter/preview/entrance/rs_dir_asset_provider.h"
31 #include "adapter/preview/external/multimodalinput/axis_event.h"
32 #include "adapter/preview/external/multimodalinput/key_event.h"
33 #include "adapter/preview/external/multimodalinput/pointer_event.h"
34 #include "adapter/preview/inspector/inspector_client.h"
35 #include "base/log/log_wrapper.h"
36 #include "frameworks/base/log/log.h"
37 #include "frameworks/base/utils/utils.h"
38 #include "frameworks/bridge/common/utils/utils.h"
39 #include "frameworks/bridge/js_frontend/js_frontend.h"
40 #ifdef INIT_ICU_DATA_PATH
41 #include "unicode/putil.h"
42 #endif
43 
44 #include "frameworks/simulator/common/include/context.h"
45 
46 namespace OHOS::Ace {
47 
48 using namespace Platform;
49 
50 namespace {
51 
52 #ifdef WINDOWS_PLATFORM
53 constexpr char DELIMITER[] = "\\";
54 constexpr char ASSET_PATH_SHARE_STAGE[] = "resources\\base\\profile";
55 #else
56 constexpr char DELIMITER[] = "/";
57 constexpr char ASSET_PATH_SHARE_STAGE[] = "resources/base/profile";
58 #endif
59 
SetFontMgrConfig(const std::string & containerSdkPath)60 void SetFontMgrConfig(const std::string& containerSdkPath)
61 {
62     // To check if use ohos or container fonts.
63     std::string runtimeOS = "OHOS_Container";
64     std::string containerFontBasePath = containerSdkPath + DELIMITER + "resources" + DELIMITER + "fonts" + DELIMITER;
65     RSDirAssetProvider dirAsset(containerFontBasePath);
66     std::vector<std::string> fileList;
67     dirAsset.GetAssetList("", fileList);
68     if (containerSdkPath.empty() || fileList.empty()) {
69         runtimeOS = "OHOS";
70         containerFontBasePath = "";
71     }
72     SkFontMgr::SetFontMgrConfig(runtimeOS, containerFontBasePath);
73 }
74 
75 } // namespace
76 
77 using ContentFinishCallback = std::function<void()>;
78 using ContentStartAbilityCallback = std::function<void(const std::string& address)>;
79 class ContentEventCallback final : public PlatformEventCallback {
80 public:
ContentEventCallback(ContentFinishCallback onFinish)81     explicit ContentEventCallback(ContentFinishCallback onFinish) : onFinish_(onFinish) {}
ContentEventCallback(ContentFinishCallback onFinish,ContentStartAbilityCallback onStartAbility)82     ContentEventCallback(ContentFinishCallback onFinish, ContentStartAbilityCallback onStartAbility)
83         : onFinish_(onFinish), onStartAbility_(onStartAbility)
84     {}
85     ~ContentEventCallback() override = default;
86 
OnFinish() const87     void OnFinish() const override
88     {
89         LOGI("UIContent OnFinish");
90         CHECK_NULL_VOID(onFinish_);
91         onFinish_();
92     }
93 
OnStartAbility(const std::string & address)94     void OnStartAbility(const std::string& address) override
95     {
96         LOGI("UIContent OnStartAbility");
97         CHECK_NULL_VOID(onStartAbility_);
98         onStartAbility_(address);
99     }
100 
OnStatusBarBgColorChanged(uint32_t color)101     void OnStatusBarBgColorChanged(uint32_t color) override
102     {
103         LOGI("UIContent OnStatusBarBgColorChanged");
104     }
105 
106 private:
107     ContentFinishCallback onFinish_;
108     ContentStartAbilityCallback onStartAbility_;
109 };
110 
111 class DragWindowListener : public OHOS::Rosen::IWindowDragListener {
112 public:
DragWindowListener(int32_t instanceId)113     explicit DragWindowListener(int32_t instanceId) : instanceId_(instanceId) {}
114     ~DragWindowListener() = default;
OnDrag(int32_t x,int32_t y,OHOS::Rosen::DragEvent event)115     void OnDrag(int32_t x, int32_t y, OHOS::Rosen::DragEvent event)
116     {
117         LOGI("[Engine Log] The feature is not supported on the previewer, and instanceId_ = %{public}d", instanceId_);
118     }
119 
120 private:
121     int32_t instanceId_ = -1;
122 };
123 
124 class TouchOutsideListener : public OHOS::Rosen::ITouchOutsideListener {
125 public:
TouchOutsideListener(int32_t instanceId)126     explicit TouchOutsideListener(int32_t instanceId) : instanceId_(instanceId) {}
127     ~TouchOutsideListener() = default;
128 
OnTouchOutside() const129     void OnTouchOutside() const
130     {
131         LOGI("[Engine Log] The feature is not supported on the previewer, and instanceId_ = %{public}d", instanceId_);
132     }
133 
134 private:
135     int32_t instanceId_ = -1;
136 };
137 
OHOS_ACE_CreateUIContent(void * context,void * runtime)138 extern "C" ACE_FORCE_EXPORT void* OHOS_ACE_CreateUIContent(void* context, void* runtime)
139 {
140     return new UIContentImpl(reinterpret_cast<OHOS::AbilityRuntime::Context*>(context), runtime);
141 }
142 
OHOS_ACE_CreateFormContent(void * context,void * runtime,bool isCard)143 extern "C" ACE_FORCE_EXPORT void* OHOS_ACE_CreateFormContent(void* context, void* runtime, bool isCard)
144 {
145     return new UIContentImpl(reinterpret_cast<OHOS::AbilityRuntime::Context*>(context), runtime, isCard);
146 }
147 
OHOS_ACE_CreateSubWindowUIContent(void * ability)148 extern "C" ACE_FORCE_EXPORT void* OHOS_ACE_CreateSubWindowUIContent(void* ability)
149 {
150     return new UIContentImpl(reinterpret_cast<OHOS::AppExecFwk::Ability*>(ability));
151 }
152 
UIContentImpl(OHOS::AbilityRuntime::Context * context,void * runtime)153 UIContentImpl::UIContentImpl(OHOS::AbilityRuntime::Context* context, void* runtime)
154     : instanceId_(ACE_INSTANCE_ID), runtime_(runtime)
155 {
156     // 基于Options的方式传递参数
157     auto options = context->GetOptions();
158     assetPath_ = options.assetPath;
159     systemResourcesPath_ = options.systemResourcePath;
160     appResourcesPath_ = options.appResourcePath;
161     containerSdkPath_ = options.containerSdkPath;
162     language_ = options.language;
163     region_ = options.region;
164     script_ = options.script;
165     themeId_ = options.themeId;
166     deviceWidth_ = options.deviceWidth;
167     deviceHeight_ = options.deviceHeight;
168     isRound_ = options.isRound;
169     onRouterChange_ = options.onRouterChange;
170     deviceConfig_.orientation = static_cast<DeviceOrientation>(options.deviceConfig.orientation);
171     deviceConfig_.deviceType = static_cast<DeviceType>(options.deviceConfig.deviceType);
172     deviceConfig_.colorMode = static_cast<ColorMode>(options.deviceConfig.colorMode);
173     deviceConfig_.density = options.deviceConfig.density;
174     deviceConfig_.fontRatio = options.deviceConfig.fontRatio;
175 
176     bundleName_ = options.bundleName;
177     compatibleVersion_ = options.compatibleVersion;
178     installationFree_ = options.installationFree;
179     labelId_ = options.labelId;
180     moduleName_ = options.moduleName;
181     compileMode_ = options.compileMode;
182     pageProfile_ = options.pageProfile;
183     const std::string profilePrefix = "$profile:";
184     if (pageProfile_.compare(0, profilePrefix.size(), profilePrefix) == 0) {
185         pageProfile_ = pageProfile_.substr(profilePrefix.length()).append(".json");
186     }
187     auto targetVersion = options.targetVersion;
188     auto releaseType = options.releaseType;
189     bool enablePartialUpdate = options.enablePartialUpdate;
190     useNewPipeline_ = AceNewPipeJudgement::QueryAceNewPipeEnabledStage(
191         "", compatibleVersion_, targetVersion, releaseType, !enablePartialUpdate);
192 }
193 
UIContentImpl(OHOS::AbilityRuntime::Context * context,void * runtime,bool isCard)194 UIContentImpl::UIContentImpl(OHOS::AbilityRuntime::Context* context, void* runtime, bool isCard)
195     : instanceId_(ACE_INSTANCE_ID), runtime_(runtime), isFormRender_(isCard)
196 {
197     LOGI("The constructor is used to support ets card, isFormRender_ = %{public}d", isFormRender_);
198     if (context) {
199         auto options = context->GetOptions();
200         bundleName_ = options.bundleName;
201         moduleName_ = options.moduleName;
202     }
203 }
204 
UIContentImpl(OHOS::AppExecFwk::Ability * ability)205 UIContentImpl::UIContentImpl(OHOS::AppExecFwk::Ability* ability) : instanceId_(ACE_INSTANCE_ID) {}
206 
DestroyUIDirector()207 void UIContentImpl::DestroyUIDirector()
208 {
209     auto container = AceContainer::GetContainerInstance(instanceId_);
210     CHECK_NULL_VOID(container);
211     auto pipelineContext = AceType::DynamicCast<PipelineContext>(container->GetPipelineContext());
212     CHECK_NULL_VOID(pipelineContext);
213     auto rsUIDirector = pipelineContext->GetRSUIDirector();
214     CHECK_NULL_VOID(rsUIDirector);
215     rsUIDirector->Destroy();
216 }
217 
DestroyCallback() const218 void UIContentImpl::DestroyCallback() const
219 {
220     auto container = AceContainer::GetContainerInstance(instanceId_);
221     CHECK_NULL_VOID(container);
222     auto pipelineContext = container->GetPipelineContext();
223     CHECK_NULL_VOID(pipelineContext);
224     pipelineContext->SetNextFrameLayoutCallback(nullptr);
225 }
226 
Initialize(OHOS::Rosen::Window * window,const std::string & url,napi_value storage)227 UIContentErrorCode UIContentImpl::Initialize(OHOS::Rosen::Window* window, const std::string& url,
228     napi_value storage)
229 {
230     auto errorCode = UIContentErrorCode::NO_ERRORS;
231     errorCode = CommonInitialize(window, url, storage);
232     CHECK_ERROR_CODE_RETURN(errorCode);
233     errorCode = AceContainer::RunPage(instanceId_, url, "");
234     return errorCode;
235 }
236 
GetContentInfo() const237 std::string UIContentImpl::GetContentInfo() const
238 {
239     return AceContainer::GetContentInfo(instanceId_);
240 }
241 
CommonInitialize(OHOS::Rosen::Window * window,const std::string & contentInfo,napi_value storage)242 UIContentErrorCode UIContentImpl::CommonInitialize(OHOS::Rosen::Window* window,
243     const std::string& contentInfo, napi_value storage)
244 {
245     static std::once_flag onceFlag;
246     std::call_once(onceFlag, []() {
247 #ifdef INIT_ICU_DATA_PATH
248         std::string icuPath = ".";
249         u_setDataDirectory(icuPath.c_str());
250 #endif
251         Container::UpdateCurrent(INSTANCE_ID_PLATFORM);
252         ClipboardProxy::GetInstance()->SetDelegate(std::make_unique<Platform::ClipboardProxyImpl>());
253     });
254     rsWindow_ = window;
255 
256     AceApplicationInfo::GetInstance().SetLocale(language_, region_, script_, "");
257     SetFontMgrConfig(containerSdkPath_);
258     EventDispatcher::GetInstance().Initialize();
259     SystemProperties::SetExtSurfaceEnabled(!containerSdkPath_.empty());
260     SystemProperties::InitDeviceInfo(deviceWidth_, deviceHeight_,
261         deviceConfig_.orientation == DeviceOrientation::PORTRAIT ? 0 : 1, deviceConfig_.density, isRound_);
262     SystemProperties::InitDeviceType(deviceConfig_.deviceType);
263     SystemProperties::SetColorMode(deviceConfig_.colorMode);
264     LOGI("CreateContainer with JSDECLARATIVE frontend, set MinPlatformVersion to %{public}d", compatibleVersion_);
265     AceContainer::CreateContainer(instanceId_, FrontendType::DECLARATIVE_JS, useNewPipeline_);
266     auto container = AceContainer::GetContainerInstance(instanceId_);
267     CHECK_NULL_RETURN(container, UIContentErrorCode::NULL_POINTER);
268     container->SetContainerSdkPath(containerSdkPath_);
269     container->SetIsFRSCardContainer(false);
270     container->SetBundleName(bundleName_);
271     container->SetModuleName(moduleName_);
272     LOGI("Save bundle %{public}s, module %{public}s", bundleName_.c_str(), moduleName_.c_str());
273     if (runtime_) {
274         container->GetSettings().SetUsingSharedRuntime(true);
275         container->SetSharedRuntime(runtime_);
276     } else {
277         container->GetSettings().SetUsingSharedRuntime(false);
278     }
279     container->SetInstallationFree(installationFree_);
280     container->SetLabelId(labelId_);
281     auto config = container->GetResourceConfiguration();
282     config.SetDeviceType(SystemProperties::GetDeviceType());
283     config.SetOrientation(SystemProperties::GetDeviceOrientation());
284     config.SetDensity(SystemProperties::GetResolution());
285     config.SetColorMode(SystemProperties::GetColorMode());
286     config.SetFontRatio(deviceConfig_.fontRatio);
287     container->SetResourceConfiguration(config);
288     container->SetPageProfile(pageProfile_);
289     std::vector<std::string> paths;
290     paths.push_back(assetPath_);
291     std::string appResourcesPath(appResourcesPath_);
292     if (!OHOS::Ace::Framework::EndWith(appResourcesPath, DELIMITER)) {
293         appResourcesPath.append(DELIMITER);
294     }
295     paths.push_back(appResourcesPath);
296     paths.push_back(appResourcesPath + ASSET_PATH_SHARE_STAGE);
297     if (!containerSdkPath_.empty()) {
298         paths.push_back(containerSdkPath_);
299     }
300     AceContainer::AddAssetPath(instanceId_, "", paths);
301     AceContainer::SetResourcesPathAndThemeStyle(
302         instanceId_, systemResourcesPath_ + "/entry", appResourcesPath_, themeId_, deviceConfig_.colorMode);
303 
304     auto view = AceViewPreview::CreateView(instanceId_, false, container->GetSettings().usePlatformAsUIThread);
305     UIEnvCallback callback = [window = rsWindow_, id = instanceId_](
306                                  const OHOS::Ace::RefPtr<PipelineContext>& context) mutable {
307         CHECK_NULL_VOID(context);
308         CHECK_NULL_VOID(window);
309         auto director = OHOS::Rosen::RSUIDirector::Create();
310         CHECK_NULL_VOID(director);
311         director->SetRSSurfaceNode(window->GetSurfaceNode());
312         auto container = AceContainer::GetContainerInstance(id);
313         CHECK_NULL_VOID(container);
314         auto func = [taskExecutor = container->GetTaskExecutor(), id](const std::function<void()>& task) {
315             CHECK_NULL_VOID(taskExecutor);
316             ContainerScope scope(id);
317             taskExecutor->PostTask(task, TaskExecutor::TaskType::UI);
318         };
319         director->SetUITaskRunner(func);
320         director->Init();
321         context->SetRSUIDirector(director);
322     };
323     AceContainer::SetView(view, rsWindow_, deviceConfig_.density, deviceWidth_, deviceHeight_, callback);
324     // Drive the native engine with the platform thread.
325     container->RunNativeEngineLoop();
326     auto pipelineContext = container->GetPipelineContext();
327     if (pipelineContext) {
328         pipelineContext->SetMinPlatformVersion(compatibleVersion_);
329         pipelineContext->SetDisplayWindowRectInfo(
330             Rect(Offset(0.0f, 0.0f), Size(deviceWidth_, deviceHeight_)));
331     }
332     container->InitializeAppConfig(assetPath_, bundleName_, moduleName_, compileMode_);
333     AceContainer::AddRouterChangeCallback(instanceId_, onRouterChange_);
334     // Should make it possible to update surface changes by using viewWidth and viewHeight.
335     view->NotifySurfaceChanged(deviceWidth_, deviceHeight_);
336     view->NotifyDensityChanged(deviceConfig_.density);
337     return UIContentErrorCode::NO_ERRORS;
338 }
339 
Destroy()340 void UIContentImpl::Destroy()
341 {
342     LOGI("UIContentImpl: window destroy");
343     AceContainer::DestroyContainer(instanceId_);
344 }
345 
GetBackgroundColor()346 uint32_t UIContentImpl::GetBackgroundColor()
347 {
348     auto container = AceContainer::GetContainerInstance(instanceId_);
349     CHECK_NULL_RETURN(container, 0x000000);
350     auto taskExecutor = container->GetTaskExecutor();
351     CHECK_NULL_RETURN(taskExecutor, 0x000000);
352     ContainerScope scope(instanceId_);
353     uint32_t bgColor = 0x000000;
354     taskExecutor->PostSyncTask(
355         [&bgColor, container]() {
356             CHECK_NULL_VOID(container);
357             auto pipelineContext = container->GetPipelineContext();
358             CHECK_NULL_VOID(pipelineContext);
359             bgColor = pipelineContext->GetAppBgColor().GetValue();
360         },
361         TaskExecutor::TaskType::UI);
362 
363     return bgColor;
364 }
365 
SetBackgroundColor(uint32_t color)366 void UIContentImpl::SetBackgroundColor(uint32_t color)
367 {
368     LOGI("UIContentImpl: SetBackgroundColor color is %{public}u", color);
369     auto container = AceContainer::GetContainerInstance(instanceId_);
370     CHECK_NULL_VOID(container);
371     ContainerScope scope(instanceId_);
372     auto taskExecutor = container->GetTaskExecutor();
373     CHECK_NULL_VOID(taskExecutor);
374     taskExecutor->PostSyncTask(
375         [container, bgColor = color]() {
376             auto pipelineContext = container->GetPipelineContext();
377             CHECK_NULL_VOID(pipelineContext);
378             pipelineContext->SetAppBgColor(Color(bgColor));
379         },
380         TaskExecutor::TaskType::UI);
381 }
382 
ProcessBackPressed()383 bool UIContentImpl::ProcessBackPressed()
384 {
385     LOGI("Process Back Pressed Event");
386     return EventDispatcher::GetInstance().DispatchBackPressedEvent();
387 }
388 
ProcessPointerEvent(const std::shared_ptr<OHOS::MMI::PointerEvent> & pointerEvent)389 bool UIContentImpl::ProcessPointerEvent(const std::shared_ptr<OHOS::MMI::PointerEvent>& pointerEvent)
390 {
391     return EventDispatcher::GetInstance().DispatchTouchEvent(pointerEvent);
392 }
393 
ProcessPointerEventWithCallback(const std::shared_ptr<OHOS::MMI::PointerEvent> & pointerEvent,const std::function<void ()> & callback)394 bool UIContentImpl::ProcessPointerEventWithCallback(
395     const std::shared_ptr<OHOS::MMI::PointerEvent>& pointerEvent, const std::function<void()>& callback)
396 {
397     auto result = EventDispatcher::GetInstance().DispatchTouchEvent(pointerEvent);
398     if (callback) {
399         callback();
400     }
401     return result;
402 }
403 
ProcessKeyEvent(const std::shared_ptr<OHOS::MMI::KeyEvent> & keyEvent)404 bool UIContentImpl::ProcessKeyEvent(const std::shared_ptr<OHOS::MMI::KeyEvent>& keyEvent)
405 {
406     return EventDispatcher::GetInstance().DispatchKeyEvent(keyEvent);
407 }
408 
ProcessAxisEvent(const std::shared_ptr<OHOS::MMI::AxisEvent> & axisEvent)409 bool UIContentImpl::ProcessAxisEvent(const std::shared_ptr<OHOS::MMI::AxisEvent>& axisEvent)
410 {
411     return false;
412 }
413 
ProcessVsyncEvent(uint64_t timeStampNanos)414 bool UIContentImpl::ProcessVsyncEvent(uint64_t timeStampNanos)
415 {
416     return false;
417 }
418 
UpdateConfiguration(const std::shared_ptr<OHOS::AppExecFwk::Configuration> & config)419 void UIContentImpl::UpdateConfiguration(const std::shared_ptr<OHOS::AppExecFwk::Configuration>& config) {}
420 
UpdateViewportConfig(const ViewportConfig & config,OHOS::Rosen::WindowSizeChangeReason reason,const std::shared_ptr<OHOS::Rosen::RSTransaction> & rsTransaction)421 void UIContentImpl::UpdateViewportConfig(const ViewportConfig& config, OHOS::Rosen::WindowSizeChangeReason reason,
422     const std::shared_ptr<OHOS::Rosen::RSTransaction>& rsTransaction)
423 {
424     LOGI("ViewportConfig: %{public}s", config.ToString().c_str());
425     auto container = AceContainer::GetContainerInstance(instanceId_);
426     CHECK_NULL_VOID(container);
427     auto context = container->GetPipelineContext();
428     CHECK_NULL_VOID(context);
429     context->SetDisplayWindowRectInfo(
430         Rect(Offset(config.Left(), config.Top()), Size(config.Width(), config.Height())));
431     auto viewPtr = container->GetAceView();
432     CHECK_NULL_VOID(viewPtr);
433     SystemProperties::InitDeviceInfo(
434         config.Width(), config.Height(), config.Height() >= config.Width() ? 0 : 1, config.Density(), false);
435     deviceConfig_.orientation =
436         config.Height() >= config.Width() ? DeviceOrientation::PORTRAIT : DeviceOrientation::LANDSCAPE;
437     deviceConfig_.density = config.Density();
438     // Unlike the real machine, previewer require updating device configuration information to change window size.
439     container->UpdateDeviceConfig(deviceConfig_);
440     viewPtr->NotifyDensityChanged(config.Density());
441     viewPtr->NotifySurfaceChanged(config.Width(), config.Height());
442 }
443 
DumpInfo(const std::vector<std::string> & params,std::vector<std::string> & info)444 void UIContentImpl::DumpInfo(const std::vector<std::string>& params, std::vector<std::string>& info)
445 {
446     auto container = AceContainer::GetContainerInstance(instanceId_);
447     CHECK_NULL_VOID(container);
448     container->Dump(params, info);
449 }
450 
SetNextFrameLayoutCallback(std::function<void ()> && callback)451 void UIContentImpl::SetNextFrameLayoutCallback(std::function<void()>&& callback)
452 {
453     CHECK_NULL_VOID(callback);
454     auto container = AceContainer::GetContainerInstance(instanceId_);
455     CHECK_NULL_VOID(container);
456     auto pipelineContext = container->GetPipelineContext();
457     CHECK_NULL_VOID(pipelineContext);
458     pipelineContext->SetNextFrameLayoutCallback(std::move(callback));
459 }
460 
NotifyMemoryLevel(int32_t level)461 void UIContentImpl::NotifyMemoryLevel(int32_t level)
462 {
463     LOGI("Receive Memory level notification, level: %{public}d", level);
464     auto container = AceContainer::GetContainerInstance(instanceId_);
465     CHECK_NULL_VOID(container);
466     auto pipelineContext = container->GetPipelineContext();
467     CHECK_NULL_VOID(pipelineContext);
468     ContainerScope scope(instanceId_);
469     pipelineContext->NotifyMemoryLevel(level);
470 }
471 
CreateModalUIExtension(const AAFwk::Want & want,const ModalUIExtensionCallbacks & callbacks,const ModalUIExtensionConfig & config)472 int32_t UIContentImpl::CreateModalUIExtension(
473     const AAFwk::Want& want, const ModalUIExtensionCallbacks& callbacks, const ModalUIExtensionConfig& config)
474 {
475     return 0;
476 }
477 
CloseModalUIExtension(int32_t sessionId)478 void UIContentImpl::CloseModalUIExtension(int32_t sessionId) {}
479 } // namespace OHOS::Ace
480