From 5f1dba55ccd68ff36e88fd67039de0633226e389 Mon Sep 17 00:00:00 2001 From: zhanghaibo Date: Thu, 2 Jan 2025 16:45:43 +0800 Subject: [PATCH] optimize event priority of dialog Signed-off-by: zhanghaibo Change-Id: Ia6dc4a7a9cb37e3eceb39de6f3cd295e51d4a7b8 --- adapter/ohos/entrance/dialog_container.cpp | 28 +++++++++---------- .../entrance/subwindow/subwindow_ohos.cpp | 15 +++++----- adapter/ohos/entrance/ui_content_impl.cpp | 8 +++--- .../base/subwindow/subwindow_manager.cpp | 10 +++---- .../frontend_delegate_declarative.cpp | 24 ++++++++-------- .../jsview/menu/js_context_menu.cpp | 2 +- .../jsview/models/action_sheet_model_impl.cpp | 2 +- .../jsview/models/alert_dialog_model_impl.cpp | 2 +- .../custom_dialog_controller_model_impl.cpp | 6 ++-- .../ng/frontend_delegate_declarative_ng.cpp | 12 ++++---- .../js_frontend/frontend_delegate_impl.cpp | 19 +++++++------ .../bubble/bubble_layout_algorithm.cpp | 2 +- .../pattern/bubble/bubble_pattern.cpp | 9 ------ .../pattern/bubble/bubble_pattern.h | 1 - .../pattern/dialog/alert_dialog_model_ng.cpp | 2 +- .../custom_dialog_controller_model_ng.cpp | 4 +-- .../pattern/dialog/dialog_event_hub.cpp | 2 +- .../pattern/menu/menu_pattern.cpp | 2 +- .../menu/wrapper/menu_wrapper_pattern.cpp | 2 +- .../pattern/overlay/overlay_manager.cpp | 10 +++---- .../pattern/select/select_pattern.cpp | 2 +- .../napi/kits/promptaction/prompt_action.cpp | 8 +++--- 22 files changed, 84 insertions(+), 88 deletions(-) diff --git a/adapter/ohos/entrance/dialog_container.cpp b/adapter/ohos/entrance/dialog_container.cpp index 9f20efee628..ba24188e565 100644 --- a/adapter/ohos/entrance/dialog_container.cpp +++ b/adapter/ohos/entrance/dialog_container.cpp @@ -62,7 +62,7 @@ void DialogContainer::InitializeTouchEventCallback() CHECK_NULL_VOID(markProcess); markProcess(); }, - TaskExecutor::TaskType::UI, "ArkUIDialogTouchEvent"); + TaskExecutor::TaskType::UI, "ArkUIDialogTouchEvent", PriorityType::VIP); }; aceView_->RegisterTouchEventCallback(touchEventCallback); } @@ -80,7 +80,7 @@ void DialogContainer::InitializeMouseEventCallback() CHECK_NULL_VOID(markProcess); markProcess(); }, - TaskExecutor::TaskType::UI, "ArkUIDialogMouseEvent"); + TaskExecutor::TaskType::UI, "ArkUIDialogMouseEvent", PriorityType::VIP); }; aceView_->RegisterMouseEventCallback(mouseEventCallback); } @@ -98,7 +98,7 @@ void DialogContainer::InitializeAxisEventCallback() CHECK_NULL_VOID(markProcess); markProcess(); }, - TaskExecutor::TaskType::UI, "ArkUIDialogAxisEvent"); + TaskExecutor::TaskType::UI, "ArkUIDialogAxisEvent", PriorityType::VIP); }; aceView_->RegisterAxisEventCallback(axisEventCallback); } @@ -166,7 +166,7 @@ void DialogContainer::InitializeViewChangeCallback() [context, width, height, type, rsTransaction]() { context->OnSurfaceChanged(width, height, type, rsTransaction); }, - TaskExecutor::TaskType::UI, "ArkUIDialogSurfaceChanged"); + TaskExecutor::TaskType::UI, "ArkUIDialogSurfaceChanged", PriorityType::VIP); }; aceView_->RegisterViewChangeCallback(viewChangeCallback); } @@ -179,7 +179,7 @@ void DialogContainer::InitializeDensityChangeCallback() ACE_SCOPED_TRACE("DensityChangeCallback(%lf)", density); context->GetTaskExecutor()->PostTask( [context, density]() { context->OnSurfaceDensityChanged(density); }, - TaskExecutor::TaskType::UI, "ArkUIDialogSurfaceDensityChanged"); + TaskExecutor::TaskType::UI, "ArkUIDialogSurfaceDensityChanged", PriorityType::VIP); }; aceView_->RegisterDensityChangeCallback(densityChangeCallback); } @@ -193,7 +193,7 @@ void DialogContainer::InitializeSystemBarHeightChangeCallback() ACE_SCOPED_TRACE("SystemBarHeightChangeCallback(%lf, %lf)", statusBar, navigationBar); context->GetTaskExecutor()->PostTask( [context, statusBar, navigationBar]() { context->OnSystemBarHeightChanged(statusBar, navigationBar); }, - TaskExecutor::TaskType::UI, "ArkUIDialogSystemBarHeightChanged"); + TaskExecutor::TaskType::UI, "ArkUIDialogSystemBarHeightChanged", PriorityType::VIP); }; aceView_->RegisterSystemBarHeightChangeCallback(systemBarHeightChangeCallback); } @@ -205,7 +205,7 @@ void DialogContainer::InitializeSurfaceDestroyCallback() ContainerScope scope(id); context->GetTaskExecutor()->PostTask( [context]() { context->OnSurfaceDestroyed(); }, - TaskExecutor::TaskType::UI, "ArkUIDialogSurfaceDestroyed"); + TaskExecutor::TaskType::UI, "ArkUIDialogSurfaceDestroyed", PriorityType::VIP); }; aceView_->RegisterSurfaceDestroyCallback(surfaceDestroyCallback); } @@ -219,7 +219,7 @@ void DialogContainer::InitializeDragEventCallback() ContainerScope scope(id); context->GetTaskExecutor()->PostTask( [context, pointerEvent, action, node]() { context->OnDragEvent(pointerEvent, action, node); }, - TaskExecutor::TaskType::UI, "ArkUIDialogDragEvent"); + TaskExecutor::TaskType::UI, "ArkUIDialogDragEvent", PriorityType::VIP); }; aceView_->RegisterDragEventCallback(dragEventCallback); } @@ -273,7 +273,7 @@ void DialogContainer::DestroyContainer(int32_t instanceId, const std::functionDestroy(); } else { taskExecutor_->PostTask([context]() { context->Destroy(); }, - TaskExecutor::TaskType::UI, "ArkUIDialogDestoryPipeline"); + TaskExecutor::TaskType::UI, "ArkUIDialogDestoryPipeline", PriorityType::VIP); } // 2. Destroy Frontend on JS thread. RefPtr& frontend = frontend_; @@ -300,7 +300,7 @@ void DialogContainer::Destroy() frontend->UpdateState(Frontend::State::ON_DESTROY); frontend->Destroy(); }, - TaskExecutor::TaskType::JS, "ArkUIDialogFrontendDestroy"); + TaskExecutor::TaskType::JS, "ArkUIDialogFrontendDestroy", PriorityType::VIP); } } DestroyToastSubwindow(instanceId_); @@ -370,7 +370,7 @@ void DialogContainer::AttachView(std::shared_ptr window, const RefPtrPostTask([] { FrameReport::GetInstance().Init(); }, - TaskExecutor::TaskType::UI, "ArkUIDialogFrameReportInit"); + TaskExecutor::TaskType::UI, "ArkUIDialogFrameReportInit", PriorityType::VIP); ThemeConstants::InitDeviceType(); // Load custom style at UI thread before frontend attach, to make sure style can be loaded before building dom tree. RefPtr themeManager = nullptr; @@ -392,7 +392,7 @@ void DialogContainer::AttachView(std::shared_ptr window, const RefPtrLoadCustomTheme(assetManager); themeManager->LoadResourceThemes(); }, - TaskExecutor::TaskType::UI, "ArkUIDialogLoadTheme"); + TaskExecutor::TaskType::UI, "ArkUIDialogLoadTheme", PriorityType::VIP); } aceView_->Launch(); // Only MainWindow instance will be registered to watch dog. @@ -451,7 +451,7 @@ void DialogContainer::DumpHeapSnapshot(bool isPrivate) CHECK_NULL_VOID(sp); sp->DumpHeapSnapshot(isPrivate); }, - TaskExecutor::TaskType::JS, "ArkUIDialogDumpHeapSnapshot"); + TaskExecutor::TaskType::JS, "ArkUIDialogDumpHeapSnapshot", PriorityType::VIP); } void DialogContainer::SetUIWindow(int32_t instanceId, sptr& uiWindow) { diff --git a/adapter/ohos/entrance/subwindow/subwindow_ohos.cpp b/adapter/ohos/entrance/subwindow/subwindow_ohos.cpp index 1e8ac104d53..f58614faa67 100644 --- a/adapter/ohos/entrance/subwindow/subwindow_ohos.cpp +++ b/adapter/ohos/entrance/subwindow/subwindow_ohos.cpp @@ -94,7 +94,7 @@ public: CHECK_NULL_VOID(subWindow); subWindow->OnFreeMultiWindowSwitch(enable); }, - TaskExecutor::TaskType::UI, "ArkUIFreeMultiWindowSwitch"); + TaskExecutor::TaskType::UI, "ArkUIFreeMultiWindowSwitch", PriorityType::VIP); } private: @@ -430,7 +430,7 @@ void SubwindowOhos::ResizeDialogSubwindow() [this]() { ResizeWindow(); }, - TaskExecutor::TaskType::UI, "ArkUIResizeDialogSubwindow"); + TaskExecutor::TaskType::UI, "ArkUIResizeDialogSubwindow", PriorityType::VIP); } } @@ -1392,7 +1392,8 @@ void SubwindowOhos::ShowToastForService(const NG::ToastInfo& toastInfo, std::fun } SubwindowManager::GetInstance()->SetCurrentDialogSubwindow(AceType::Claim(this)); - if (!handler_->PostTask(GetInitToastDelayTask(toastInfo, std::move(callback)))) { + if (!handler_->PostTask( + GetInitToastDelayTask(toastInfo, std::move(callback)), AppExecFwk::EventHandler::Priority::VIP)) { TAG_LOGW(AceLogTag::ACE_SUB_WINDOW, "create show dialog callback failed"); return; } @@ -1497,7 +1498,7 @@ void SubwindowOhos::ShowDialogForService(const std::string& title, const std::st std::move(const_cast&&>(callbackParam)), callbacks); }; isToastWindow_ = false; - if (!handler_->PostTask(showDialogCallback)) { + if (!handler_->PostTask(showDialogCallback, AppExecFwk::EventHandler::Priority::VIP)) { TAG_LOGW(AceLogTag::ACE_SUB_WINDOW, "create show dialog callback failed"); return; } @@ -1560,7 +1561,7 @@ void SubwindowOhos::ShowDialogForService(const PromptDialogAttr& dialogAttr, con std::move(const_cast&&>(callbackParam)), callbacks); }; isToastWindow_ = false; - if (!handler_->PostTask(showDialogCallback)) { + if (!handler_->PostTask(showDialogCallback, AppExecFwk::EventHandler::Priority::VIP)) { TAG_LOGW(AceLogTag::ACE_SUB_WINDOW, "create show dialog callback failed"); return; } @@ -1715,7 +1716,7 @@ void SubwindowOhos::ShowActionMenuForService( std::move(const_cast&&>(callbackParam))); }; isToastWindow_ = false; - if (!handler_->PostTask(showDialogCallback)) { + if (!handler_->PostTask(showDialogCallback, AppExecFwk::EventHandler::Priority::VIP)) { TAG_LOGW(AceLogTag::ACE_SUB_WINDOW, "create show dialog callback failed"); return; } @@ -1882,7 +1883,7 @@ void SubwindowOhos::ResizeWindowForFoldStatus(int32_t parentContainerId) ResizeWindowForFoldStatus(); return; } - if (!handler_->PostTask(callback)) { + if (!handler_->PostTask(callback, AppExecFwk::EventHandler::Priority::VIP)) { TAG_LOGW(AceLogTag::ACE_SUB_WINDOW, "Resize Toast Window failed"); } } diff --git a/adapter/ohos/entrance/ui_content_impl.cpp b/adapter/ohos/entrance/ui_content_impl.cpp index 19890c1cf8f..f693ff66d8a 100644 --- a/adapter/ohos/entrance/ui_content_impl.cpp +++ b/adapter/ohos/entrance/ui_content_impl.cpp @@ -676,7 +676,7 @@ public: auto aceFoldStatus = static_cast(static_cast(foldStatus)); context->OnFoldStatusChanged(aceFoldStatus); }, - TaskExecutor::TaskType::UI, "ArkUIFoldStatusChanged"); + TaskExecutor::TaskType::UI, "ArkUIFoldStatusChanged", PriorityType::VIP); } private: @@ -704,7 +704,7 @@ public: auto aceDisplayMode = static_cast(static_cast(displayMode)); context->OnFoldDisplayModeChanged(aceDisplayMode); }, - TaskExecutor::TaskType::UI, "ArkUIFoldDisplayModeChanged"); + TaskExecutor::TaskType::UI, "ArkUIFoldDisplayModeChanged", PriorityType::VIP); return; } auto container = Platform::DialogContainer::GetContainer(instanceId_); @@ -719,7 +719,7 @@ public: auto aceDisplayMode = static_cast(static_cast(displayMode)); context->OnFoldDisplayModeChanged(aceDisplayMode); }, - TaskExecutor::TaskType::UI, "ArkUIDialogFoldDisplayModeChanged"); + TaskExecutor::TaskType::UI, "ArkUIDialogFoldDisplayModeChanged", PriorityType::VIP); } private: @@ -746,7 +746,7 @@ public: SubwindowManager::GetInstance()->ClearMenuNG(instanceId, targetId, true, true); SubwindowManager::GetInstance()->ClearPopupInSubwindow(instanceId); }, - TaskExecutor::TaskType::UI, "ArkUITouchOutsideSubwindowClear"); + TaskExecutor::TaskType::UI, "ArkUITouchOutsideSubwindowClear", PriorityType::VIP); } private: diff --git a/frameworks/base/subwindow/subwindow_manager.cpp b/frameworks/base/subwindow/subwindow_manager.cpp index 593f5f5ec93..b8ee176daa4 100644 --- a/frameworks/base/subwindow/subwindow_manager.cpp +++ b/frameworks/base/subwindow/subwindow_manager.cpp @@ -462,7 +462,7 @@ void SubwindowManager::ShowPopup(const RefPtr& newComponent, bool dis CHECK_NULL_VOID(newComponent); subwindow->ShowPopup(newComponent, disableTouchEvent); }, - TaskExecutor::TaskType::PLATFORM, "ArkUISubwindowShowPopup"); + TaskExecutor::TaskType::PLATFORM, "ArkUISubwindowShowPopup", PriorityType::VIP); } bool SubwindowManager::CancelPopup(const std::string& id) @@ -492,7 +492,7 @@ void SubwindowManager::ShowMenu(const RefPtr& newComponent) } subwindow->ShowMenu(menu); }, - TaskExecutor::TaskType::PLATFORM, "ArkUISubwindowShowMenu"); + TaskExecutor::TaskType::PLATFORM, "ArkUISubwindowShowMenu", PriorityType::VIP); } void SubwindowManager::CloseMenu() @@ -724,7 +724,7 @@ void SubwindowManager::ShowToastNG(const NG::ToastInfo& toastInfo, std::function TAG_LOGD(AceLogTag::ACE_SUB_WINDOW, "before show toast : %{public}d", containerId); subwindow->ShowToast(toastInfo, std::move(const_cast&&>(callbackParam))); }, - TaskExecutor::TaskType::PLATFORM, "ArkUISubwindowShowToastNG"); + TaskExecutor::TaskType::PLATFORM, "ArkUISubwindowShowToastNG", PriorityType::VIP); } ToastWindowType SubwindowManager::GetToastWindowType(int32_t instanceId) @@ -782,12 +782,12 @@ void SubwindowManager::ShowToast(const NG::ToastInfo& toastInfo, std::functionPostTask( [containerId, toastInfo, callbackParam = std::move(callback)] { - auto subwindow = SubwindowManager::GetInstance()->GetOrCreateToastWindow(containerId, toastInfo.showMode); + auto subwindow = SubwindowManager::GetInstance()->GetOrCreateToastWindow(containerId, toastInfo.showMode); CHECK_NULL_VOID(subwindow); TAG_LOGD(AceLogTag::ACE_SUB_WINDOW, "before show toast : %{public}d", containerId); subwindow->ShowToast(toastInfo, std::move(const_cast&&>(callbackParam))); }, - TaskExecutor::TaskType::PLATFORM, "ArkUISubwindowShowToast"); + TaskExecutor::TaskType::PLATFORM, "ArkUISubwindowShowToast", PriorityType::VIP); } } diff --git a/frameworks/bridge/declarative_frontend/frontend_delegate_declarative.cpp b/frameworks/bridge/declarative_frontend/frontend_delegate_declarative.cpp index 39fe70424f4..3e7c4f1ae28 100644 --- a/frameworks/bridge/declarative_frontend/frontend_delegate_declarative.cpp +++ b/frameworks/bridge/declarative_frontend/frontend_delegate_declarative.cpp @@ -66,7 +66,7 @@ void MainWindowOverlay(std::function)>&& task, c auto overlayManager = weak.Upgrade(); task(overlayManager); }, - TaskExecutor::TaskType::UI, name); + TaskExecutor::TaskType::UI, name, PriorityType::VIP); } } // namespace @@ -1618,7 +1618,7 @@ void FrontendDelegateDeclarative::ShowToast(const NG::ToastInfo& toastInfo, std: ToastComponent::GetInstance().Show(context, updatedToastInfo.message, updatedToastInfo.duration, updatedToastInfo.bottom, updatedToastInfo.isRightToLeft); }, - TaskExecutor::TaskType::UI, "ArkUIShowToast"); + TaskExecutor::TaskType::UI, "ArkUIShowToast", PriorityType::VIP); } void FrontendDelegateDeclarative::CloseToast(const int32_t toastId, std::function&& callback) @@ -1651,7 +1651,7 @@ void FrontendDelegateDeclarative::ShowDialogInner(DialogProperties& dialogProper dialogProperties.onSuccess = std::move(callback); dialogProperties.onCancel = [callback, taskExecutor = taskExecutor_] { taskExecutor->PostTask([callback]() { callback(CALLBACK_ERRORCODE_CANCEL, CALLBACK_DATACODE_ZERO); }, - TaskExecutor::TaskType::JS, "ArkUIOverlayShowDialogCancel"); + TaskExecutor::TaskType::JS, "ArkUIOverlayShowDialogCancel", PriorityType::VIP); }; auto task = [dialogProperties](const RefPtr& overlayManager) { LOGI("Begin to show dialog "); @@ -1690,7 +1690,7 @@ void FrontendDelegateDeclarative::ShowDialogInner(DialogProperties& dialogProper BackEndEventManager::GetInstance().BindBackendEvent( successEventMarker, [callback, taskExecutor = taskExecutor_](int32_t successType) { taskExecutor->PostTask([callback, successType]() { callback(CALLBACK_ERRORCODE_SUCCESS, successType); }, - TaskExecutor::TaskType::JS, "ArkUIShowDialogSuccessCallback"); + TaskExecutor::TaskType::JS, "ArkUIShowDialogSuccessCallback", PriorityType::VIP); }); callbackMarkers.emplace(COMMON_SUCCESS, successEventMarker); } @@ -1700,7 +1700,7 @@ void FrontendDelegateDeclarative::ShowDialogInner(DialogProperties& dialogProper BackEndEventManager::GetInstance().BindBackendEvent( cancelEventMarker, [callback, taskExecutor = taskExecutor_] { taskExecutor->PostTask([callback]() { callback(CALLBACK_ERRORCODE_CANCEL, CALLBACK_DATACODE_ZERO); }, - TaskExecutor::TaskType::JS, "ArkUIShowDialogCancelCallback"); + TaskExecutor::TaskType::JS, "ArkUIShowDialogCancelCallback", PriorityType::VIP); }); callbackMarkers.emplace(COMMON_CANCEL, cancelEventMarker); } @@ -1710,7 +1710,7 @@ void FrontendDelegateDeclarative::ShowDialogInner(DialogProperties& dialogProper BackEndEventManager::GetInstance().BindBackendEvent( completeEventMarker, [callback, taskExecutor = taskExecutor_] { taskExecutor->PostTask([callback]() { callback(CALLBACK_ERRORCODE_COMPLETE, CALLBACK_DATACODE_ZERO); }, - TaskExecutor::TaskType::JS, "ArkUIShowDialogCompleteCallback"); + TaskExecutor::TaskType::JS, "ArkUIShowDialogCompleteCallback", PriorityType::VIP); }); callbackMarkers.emplace(COMMON_COMPLETE, completeEventMarker); } @@ -1929,7 +1929,7 @@ void FrontendDelegateDeclarative::CloseCustomDialog(const WeakPtr& n TAG_LOGI(AceLogTag::ACE_OVERLAY, "begin to close custom dialog."); overlayManager->CloseCustomDialog(node, std::move(callback)); }, - TaskExecutor::TaskType::UI, "ArkUIOverlayCloseCustomDialog"); + TaskExecutor::TaskType::UI, "ArkUIOverlayCloseCustomDialog", PriorityType::VIP); } void FrontendDelegateDeclarative::UpdateCustomDialog( @@ -1959,7 +1959,7 @@ void FrontendDelegateDeclarative::UpdateCustomDialog( TAG_LOGI(AceLogTag::ACE_OVERLAY, "begin to update custom dialog."); overlayManager->UpdateCustomDialog(node, dialogProperties, std::move(callback)); }, - TaskExecutor::TaskType::UI, "ArkUIOverlayUpdateCustomDialog"); + TaskExecutor::TaskType::UI, "ArkUIOverlayUpdateCustomDialog", PriorityType::VIP); } void FrontendDelegateDeclarative::ShowActionMenuInner(DialogProperties& dialogProperties, @@ -1984,7 +1984,7 @@ void FrontendDelegateDeclarative::ShowActionMenuInner(DialogProperties& dialogPr callback(CALLBACK_ERRORCODE_SUCCESS, successType); } }, - TaskExecutor::TaskType::JS, "ArkUIDialogShowActionMenuSuccess"); + TaskExecutor::TaskType::JS, "ArkUIDialogShowActionMenuSuccess", PriorityType::VIP); }); callbackMarkers.emplace(COMMON_SUCCESS, successEventMarker); @@ -1992,7 +1992,7 @@ void FrontendDelegateDeclarative::ShowActionMenuInner(DialogProperties& dialogPr BackEndEventManager::GetInstance().BindBackendEvent( cancelEventMarker, [callback, taskExecutor = taskExecutor_] { taskExecutor->PostTask([callback]() { callback(CALLBACK_ERRORCODE_CANCEL, CALLBACK_DATACODE_ZERO); }, - TaskExecutor::TaskType::JS, "ArkUIDialogShowActionMenuCancel"); + TaskExecutor::TaskType::JS, "ArkUIDialogShowActionMenuCancel", PriorityType::VIP); }); callbackMarkers.emplace(COMMON_CANCEL, cancelEventMarker); dialogProperties.callbacks = std::move(callbackMarkers); @@ -2009,7 +2009,7 @@ void FrontendDelegateDeclarative::ShowActionMenuInnerNG(DialogProperties& dialog dialogProperties.onCancel = [callback, taskExecutor = taskExecutor_] { taskExecutor->PostTask( [callback]() { callback(CALLBACK_ERRORCODE_CANCEL, CALLBACK_DATACODE_ZERO); }, - TaskExecutor::TaskType::JS, "ArkUIOverlayShowActionMenuCancel"); + TaskExecutor::TaskType::JS, "ArkUIOverlayShowActionMenuCancel", PriorityType::VIP); }; auto context = DynamicCast(pipelineContextHolder_.Get()); auto overlayManager = context ? context->GetOverlayManager() : nullptr; @@ -2042,7 +2042,7 @@ void FrontendDelegateDeclarative::ShowActionMenuInnerNG(DialogProperties& dialog CHECK_NULL_VOID(dialog); } }, - TaskExecutor::TaskType::UI, "ArkUIOverlayShowActionMenuInner"); + TaskExecutor::TaskType::UI, "ArkUIOverlayShowActionMenuInner", PriorityType::VIP); } void FrontendDelegateDeclarative::ShowActionMenu( diff --git a/frameworks/bridge/declarative_frontend/jsview/menu/js_context_menu.cpp b/frameworks/bridge/declarative_frontend/jsview/menu/js_context_menu.cpp index 2963e1793da..be7c6ed243d 100644 --- a/frameworks/bridge/declarative_frontend/jsview/menu/js_context_menu.cpp +++ b/frameworks/bridge/declarative_frontend/jsview/menu/js_context_menu.cpp @@ -51,7 +51,7 @@ void JSContextMenu::Close(const JSCallbackInfo& args) context->CloseContextMenu(); } }, - TaskExecutor::TaskType::UI, "ArkUIContextMenuClose"); + TaskExecutor::TaskType::UI, "ArkUIContextMenuClose", PriorityType::VIP); } } #endif diff --git a/frameworks/bridge/declarative_frontend/jsview/models/action_sheet_model_impl.cpp b/frameworks/bridge/declarative_frontend/jsview/models/action_sheet_model_impl.cpp index 0c6c1e8a038..2a4f1b5a57f 100644 --- a/frameworks/bridge/declarative_frontend/jsview/models/action_sheet_model_impl.cpp +++ b/frameworks/bridge/declarative_frontend/jsview/models/action_sheet_model_impl.cpp @@ -33,7 +33,7 @@ void ActionSheetModelImpl::ShowActionSheet(const DialogProperties& arg) context->ShowDialog(arg, false, "ActionSheet"); } }, - TaskExecutor::TaskType::UI, "ArkUIDialogShowActionSheet"); + TaskExecutor::TaskType::UI, "ArkUIDialogShowActionSheet", PriorityType::VIP); } } } diff --git a/frameworks/bridge/declarative_frontend/jsview/models/alert_dialog_model_impl.cpp b/frameworks/bridge/declarative_frontend/jsview/models/alert_dialog_model_impl.cpp index f9ad498da02..e82acc98a66 100644 --- a/frameworks/bridge/declarative_frontend/jsview/models/alert_dialog_model_impl.cpp +++ b/frameworks/bridge/declarative_frontend/jsview/models/alert_dialog_model_impl.cpp @@ -48,7 +48,7 @@ void AlertDialogModelImpl::SetShowDialog(const DialogProperties& arg) context->ShowDialog(arg, false, "AlertDialog"); } }, - TaskExecutor::TaskType::UI, "ArkUIDialogShowAlertDialog"); + TaskExecutor::TaskType::UI, "ArkUIDialogShowAlertDialog", PriorityType::VIP); } } } diff --git a/frameworks/bridge/declarative_frontend/jsview/models/custom_dialog_controller_model_impl.cpp b/frameworks/bridge/declarative_frontend/jsview/models/custom_dialog_controller_model_impl.cpp index ed16dc8cfee..15b2b7d0167 100644 --- a/frameworks/bridge/declarative_frontend/jsview/models/custom_dialog_controller_model_impl.cpp +++ b/frameworks/bridge/declarative_frontend/jsview/models/custom_dialog_controller_model_impl.cpp @@ -128,7 +128,8 @@ void CustomDialogControllerModelImpl::ShowDialog(DialogProperties& dialogPropert auto stack = context->GetLastStack(); auto result = false; if (stack) { - result = executor->PostTask(task, TaskExecutor::TaskType::UI, "ArkUICustomDialogNotifyOpenOperation"); + result = executor->PostTask( + task, TaskExecutor::TaskType::UI, "ArkUICustomDialogNotifyOpenOperation", PriorityType::VIP); } else { LOGE("JSCustomDialogController(ShowDialog) stack is null, post delay task."); result = executor->PostDelayedTask( @@ -210,7 +211,8 @@ void CustomDialogControllerModelImpl::CloseDialog(DialogProperties& dialogProper this->NotifyDialogOperation(DialogOperation::DIALOG_CLOSE, dialogProperties, pending, isShown, std::move(cancelTask), dialogComponent, customDialog, dialogOperation); }; - auto result = executor->PostTask(task, TaskExecutor::TaskType::UI, "ArkUICustomDialogNotifyCloseOperation"); + auto result = executor->PostTask( + task, TaskExecutor::TaskType::UI, "ArkUICustomDialogNotifyCloseOperation", PriorityType::VIP); if (!result) { LOGW("JSCustomDialogController(CloseDialog) fail to post task, reset pending status"); pending = false; diff --git a/frameworks/bridge/declarative_frontend/ng/frontend_delegate_declarative_ng.cpp b/frameworks/bridge/declarative_frontend/ng/frontend_delegate_declarative_ng.cpp index b0766eeb2c2..32548f85a11 100644 --- a/frameworks/bridge/declarative_frontend/ng/frontend_delegate_declarative_ng.cpp +++ b/frameworks/bridge/declarative_frontend/ng/frontend_delegate_declarative_ng.cpp @@ -46,7 +46,7 @@ void MainWindowOverlay(std::function)>&& task, c auto overlayManager = weak.Upgrade(); task(overlayManager); }, - TaskExecutor::TaskType::UI, name); + TaskExecutor::TaskType::UI, name, PriorityType::VIP); } } // namespace @@ -857,7 +857,7 @@ void FrontendDelegateDeclarativeNG::CloseCustomDialog(const WeakPtr& TAG_LOGI(AceLogTag::ACE_OVERLAY, "begin to close custom dialog."); overlayManager->CloseCustomDialog(node, std::move(callback)); }, - TaskExecutor::TaskType::UI, "ArkUIOverlayCloseCustomDialog"); + TaskExecutor::TaskType::UI, "ArkUIOverlayCloseCustomDialog", PriorityType::VIP); } void FrontendDelegateDeclarativeNG::UpdateCustomDialog( @@ -887,7 +887,7 @@ void FrontendDelegateDeclarativeNG::UpdateCustomDialog( TAG_LOGI(AceLogTag::ACE_OVERLAY, "begin to update custom dialog."); overlayManager->UpdateCustomDialog(node, dialogProperties, std::move(callback)); }, - TaskExecutor::TaskType::UI, "ArkUIOverlayUpdateCustomDialog"); + TaskExecutor::TaskType::UI, "ArkUIOverlayUpdateCustomDialog", PriorityType::VIP); } void FrontendDelegateDeclarativeNG::ShowActionMenu( @@ -1103,7 +1103,7 @@ void FrontendDelegateDeclarativeNG::ShowDialogInner(DialogProperties& dialogProp dialogProperties.onCancel = [callback, taskExecutor = taskExecutor_] { taskExecutor->PostTask( [callback]() { callback(CALLBACK_ERRORCODE_CANCEL, CALLBACK_DATACODE_ZERO); }, - TaskExecutor::TaskType::JS, "ArkUIOverlayShowDialogCancel"); + TaskExecutor::TaskType::JS, "ArkUIOverlayShowDialogCancel", PriorityType::VIP); }; auto task = [dialogProperties](const RefPtr& overlayManager) { LOGI("Begin to show dialog "); @@ -1145,7 +1145,7 @@ void FrontendDelegateDeclarativeNG::ShowActionMenuInner(DialogProperties& dialog dialogProperties.onCancel = [callback, taskExecutor = taskExecutor_] { taskExecutor->PostTask( [callback]() { callback(CALLBACK_ERRORCODE_CANCEL, CALLBACK_DATACODE_ZERO); }, - TaskExecutor::TaskType::JS, "ArkUIOverlayShowActionMenuCancel"); + TaskExecutor::TaskType::JS, "ArkUIOverlayShowActionMenuCancel", PriorityType::VIP); }; auto context = DynamicCast(pipelineContextHolder_.Get()); auto overlayManager = context ? context->GetOverlayManager() : nullptr; @@ -1155,7 +1155,7 @@ void FrontendDelegateDeclarativeNG::ShowActionMenuInner(DialogProperties& dialog CHECK_NULL_VOID(overlayManager); overlayManager->ShowDialog(dialogProperties, nullptr, AceApplicationInfo::GetInstance().IsRightToLeft()); }, - TaskExecutor::TaskType::UI, "ArkUIOverlayShowActionMenu"); + TaskExecutor::TaskType::UI, "ArkUIOverlayShowActionMenu", PriorityType::VIP); return; } diff --git a/frameworks/bridge/js_frontend/frontend_delegate_impl.cpp b/frameworks/bridge/js_frontend/frontend_delegate_impl.cpp index 3cdcee4451c..b1c02e49f00 100644 --- a/frameworks/bridge/js_frontend/frontend_delegate_impl.cpp +++ b/frameworks/bridge/js_frontend/frontend_delegate_impl.cpp @@ -956,7 +956,7 @@ void FrontendDelegateImpl::ShowToast(const NG::ToastInfo& toastInfo, std::functi ToastComponent::GetInstance().Show(weak.Upgrade(), updatedToastInfo.message, updatedToastInfo.duration, updatedToastInfo.bottom, updatedToastInfo.isRightToLeft); }, - TaskExecutor::TaskType::UI, "ArkUIShowToast"); + TaskExecutor::TaskType::UI, "ArkUIShowToast", PriorityType::VIP); } Rect FrontendDelegateImpl::GetBoundingRectData(NodeId nodeId) @@ -996,7 +996,7 @@ void FrontendDelegateImpl::ShowDialog(const std::string& title, const std::strin BackEndEventManager::GetInstance().BindBackendEvent( successEventMarker, [callback, taskExecutor = taskExecutor_](int32_t successType) { taskExecutor->PostTask([callback, successType]() { callback(0, successType); }, - TaskExecutor::TaskType::JS, "ArkUIShowDialogSuccessCallback"); + TaskExecutor::TaskType::JS, "ArkUIShowDialogSuccessCallback", PriorityType::VIP); }); callbackMarkers.emplace(COMMON_SUCCESS, successEventMarker); } @@ -1005,7 +1005,10 @@ void FrontendDelegateImpl::ShowDialog(const std::string& title, const std::strin BackEndEventManager::GetInstance().BindBackendEvent( cancelEventMarker, [callback, taskExecutor = taskExecutor_] { taskExecutor->PostTask( - [callback]() { callback(1, 0); }, TaskExecutor::TaskType::JS, "ArkUIShowDialogCancelCallback"); + [callback]() { callback(1, 0); }, + TaskExecutor::TaskType::JS, + "ArkUIShowDialogCancelCallback", + PriorityType::VIP); }); callbackMarkers.emplace(COMMON_CANCEL, cancelEventMarker); } @@ -1014,7 +1017,7 @@ void FrontendDelegateImpl::ShowDialog(const std::string& title, const std::strin BackEndEventManager::GetInstance().BindBackendEvent( completeEventMarker, [callback, taskExecutor = taskExecutor_] { taskExecutor->PostTask([callback]() { callback(CALLBACK_ERRORCODE_COMPLETE, 0); }, - TaskExecutor::TaskType::JS, "ArkUIShowDialogCompleteCallback"); + TaskExecutor::TaskType::JS, "ArkUIShowDialogCompleteCallback", PriorityType::VIP); }); callbackMarkers.emplace(COMMON_COMPLETE, completeEventMarker); } @@ -1033,7 +1036,7 @@ void FrontendDelegateImpl::ShowDialog(const std::string& title, const std::strin context->ShowDialog(dialogProperties, isRightToLeft); } }, - TaskExecutor::TaskType::UI, "ArkUIShowDialog"); + TaskExecutor::TaskType::UI, "ArkUIShowDialog", PriorityType::VIP); } void FrontendDelegateImpl::ShowActionMenu(const std::string& title, @@ -1057,7 +1060,7 @@ void FrontendDelegateImpl::ShowActionMenu(const std::string& title, callback(0, successType); } }, - TaskExecutor::TaskType::JS, "ArkUIShowActionMenuSuccess"); + TaskExecutor::TaskType::JS, "ArkUIShowActionMenuSuccess", PriorityType::VIP); }); callbackMarkers.emplace(COMMON_SUCCESS, successEventMarker); @@ -1065,7 +1068,7 @@ void FrontendDelegateImpl::ShowActionMenu(const std::string& title, BackEndEventManager::GetInstance().BindBackendEvent( cancelEventMarker, [callback, taskExecutor = taskExecutor_] { taskExecutor->PostTask([callback]() { callback(1, 0); }, - TaskExecutor::TaskType::JS, "ArkUIShowActionMenuCancel"); + TaskExecutor::TaskType::JS, "ArkUIShowActionMenuCancel", PriorityType::VIP); }); callbackMarkers.emplace(COMMON_CANCEL, cancelEventMarker); @@ -1089,7 +1092,7 @@ void FrontendDelegateImpl::ShowActionMenu(const std::string& title, context->ShowDialog(dialogProperties, isRightToLeft); } }, - TaskExecutor::TaskType::UI, "ArkUIShowActionMenu"); + TaskExecutor::TaskType::UI, "ArkUIShowActionMenu", PriorityType::VIP); } void FrontendDelegateImpl::EnableAlertBeforeBackPage( diff --git a/frameworks/core/components_ng/pattern/bubble/bubble_layout_algorithm.cpp b/frameworks/core/components_ng/pattern/bubble/bubble_layout_algorithm.cpp index f49afb3084c..7bd517d5aad 100644 --- a/frameworks/core/components_ng/pattern/bubble/bubble_layout_algorithm.cpp +++ b/frameworks/core/components_ng/pattern/bubble/bubble_layout_algorithm.cpp @@ -546,7 +546,7 @@ void BubbleLayoutAlgorithm::SetHotAreas(bool showInSubWindow, bool isBlock, auto subWindowMgr = SubwindowManager::GetInstance(); subWindowMgr->SetHotAreas(rects, frameNode->GetId(), containerId); }, - TaskExecutor::TaskType::UI, "ArkUIPopupSetHotAreas"); + TaskExecutor::TaskType::UI, "ArkUIPopupSetHotAreas", PriorityType::VIP); } } diff --git a/frameworks/core/components_ng/pattern/bubble/bubble_pattern.cpp b/frameworks/core/components_ng/pattern/bubble/bubble_pattern.cpp index 0e6272dd3e3..6d283e08f68 100644 --- a/frameworks/core/components_ng/pattern/bubble/bubble_pattern.cpp +++ b/frameworks/core/components_ng/pattern/bubble/bubble_pattern.cpp @@ -416,15 +416,6 @@ void BubblePattern::Animation( option, [buttonContext = renderContext, color = endColor]() { buttonContext->UpdateBackgroundColor(color); }); } -bool BubblePattern::PostTask(const TaskExecutor::Task& task, const std::string& name) -{ - auto pipeline = PipelineBase::GetCurrentContext(); - CHECK_NULL_RETURN(pipeline, false); - auto taskExecutor = pipeline->GetTaskExecutor(); - CHECK_NULL_RETURN(taskExecutor, false); - return taskExecutor->PostTask(task, TaskExecutor::TaskType::UI, name); -} - void BubblePattern::StartEnteringTransitionEffects( const RefPtr& popupNode, const std::function& finish) { diff --git a/frameworks/core/components_ng/pattern/bubble/bubble_pattern.h b/frameworks/core/components_ng/pattern/bubble/bubble_pattern.h index c532db63a2d..69ebbef2cd9 100644 --- a/frameworks/core/components_ng/pattern/bubble/bubble_pattern.h +++ b/frameworks/core/components_ng/pattern/bubble/bubble_pattern.h @@ -282,7 +282,6 @@ private: OffsetT GetInvisibleOffset(); RefPtr GetRenderContext(); void ResetToInvisible(); - bool PostTask(const TaskExecutor::Task& task, const std::string& name); void StartOffsetEnteringAnimation(); void StartAlphaEnteringAnimation(std::function finish); void StartOffsetExitingAnimation(); diff --git a/frameworks/core/components_ng/pattern/dialog/alert_dialog_model_ng.cpp b/frameworks/core/components_ng/pattern/dialog/alert_dialog_model_ng.cpp index bc65b12ed27..cacd67eb6f5 100644 --- a/frameworks/core/components_ng/pattern/dialog/alert_dialog_model_ng.cpp +++ b/frameworks/core/components_ng/pattern/dialog/alert_dialog_model_ng.cpp @@ -93,6 +93,6 @@ void AlertDialogModelNG::SetShowDialog(const DialogProperties& arg) CHECK_NULL_VOID(pattern); pattern->SetOnWillDismiss(arg.onWillDismiss); }, - TaskExecutor::TaskType::UI, "ArkUIDialogShowAlertDialog"); + TaskExecutor::TaskType::UI, "ArkUIDialogShowAlertDialog", PriorityType::VIP); } } // namespace OHOS::Ace::NG diff --git a/frameworks/core/components_ng/pattern/dialog/custom_dialog_controller_model_ng.cpp b/frameworks/core/components_ng/pattern/dialog/custom_dialog_controller_model_ng.cpp index 45f15e14edc..e8a4062b977 100644 --- a/frameworks/core/components_ng/pattern/dialog/custom_dialog_controller_model_ng.cpp +++ b/frameworks/core/components_ng/pattern/dialog/custom_dialog_controller_model_ng.cpp @@ -55,7 +55,7 @@ void CustomDialogControllerModelNG::SetOpenDialog(DialogProperties& dialogProper } auto task = ParseOpenDialogTask( currentId, controller, dialogProperties, dialogs, std::move(buildFunc), overlayManager); - executor->PostTask(task, TaskExecutor::TaskType::UI, "ArkUIDialogShowCustomDialog"); + executor->PostTask(task, TaskExecutor::TaskType::UI, "ArkUIDialogShowCustomDialog", PriorityType::VIP); } TaskExecutor::Task CustomDialogControllerModelNG::ParseOpenDialogTask(int32_t currentId, @@ -172,7 +172,7 @@ void CustomDialogControllerModelNG::SetCloseDialog(DialogProperties& dialogPrope auto executor = context->GetTaskExecutor(); CHECK_NULL_VOID(executor); auto task = ParseCloseDialogTask(controller, dialogProperties, dialogs, overlayManager); - executor->PostTask(task, TaskExecutor::TaskType::UI, "ArkUIDialogCloseCustomDialog"); + executor->PostTask(task, TaskExecutor::TaskType::UI, "ArkUIDialogCloseCustomDialog", PriorityType::VIP); } TaskExecutor::Task CustomDialogControllerModelNG::ParseCloseDialogTask(const WeakPtr& controller, diff --git a/frameworks/core/components_ng/pattern/dialog/dialog_event_hub.cpp b/frameworks/core/components_ng/pattern/dialog/dialog_event_hub.cpp index 702adf9bfb5..f050854b9cf 100644 --- a/frameworks/core/components_ng/pattern/dialog/dialog_event_hub.cpp +++ b/frameworks/core/components_ng/pattern/dialog/dialog_event_hub.cpp @@ -32,7 +32,7 @@ void DialogEventHub::FireSuccessEvent(int32_t buttonIdx) CHECK_NULL_VOID(pipelineContext); pipelineContext->GetTaskExecutor()->PostTask( [onSuccess = onSuccess_, buttonIdx] { onSuccess(0, buttonIdx); }, - TaskExecutor::TaskType::JS, "ArkUIDialogSuccessEvent"); + TaskExecutor::TaskType::JS, "ArkUIDialogSuccessEvent", PriorityType::VIP); } } // namespace OHOS::Ace::NG diff --git a/frameworks/core/components_ng/pattern/menu/menu_pattern.cpp b/frameworks/core/components_ng/pattern/menu/menu_pattern.cpp index 35bb4a5374a..e1a0a225903 100644 --- a/frameworks/core/components_ng/pattern/menu/menu_pattern.cpp +++ b/frameworks/core/components_ng/pattern/menu/menu_pattern.cpp @@ -716,7 +716,7 @@ void MenuPattern::HideStackMenu() const menuWrapper->RemoveChild(subMenuNode); menuWrapper->MarkDirtyNode(PROPERTY_UPDATE_MEASURE_SELF_AND_CHILD); }, - TaskExecutor::TaskType::UI, "HideStackMenu"); + TaskExecutor::TaskType::UI, "HideStackMenu", PriorityType::VIP); }); auto menuPattern = AceType::DynamicCast(host->GetPattern()); if (menuPattern) { diff --git a/frameworks/core/components_ng/pattern/menu/wrapper/menu_wrapper_pattern.cpp b/frameworks/core/components_ng/pattern/menu/wrapper/menu_wrapper_pattern.cpp index f4beb55d3ad..6e4878f1fc9 100644 --- a/frameworks/core/components_ng/pattern/menu/wrapper/menu_wrapper_pattern.cpp +++ b/frameworks/core/components_ng/pattern/menu/wrapper/menu_wrapper_pattern.cpp @@ -377,7 +377,7 @@ void MenuWrapperPattern::HideStackExpandMenu(const RefPtr& subMenu) menuWrapper->RemoveChild(subMenuNode); menuWrapper->MarkDirtyNode(PROPERTY_UPDATE_MEASURE_SELF_AND_CHILD); }, - TaskExecutor::TaskType::UI, "HideStackExpandMenu"); + TaskExecutor::TaskType::UI, "HideStackExpandMenu", PriorityType::VIP); }); auto menuFrameNode = DynamicCast(menuNode); CHECK_NULL_VOID(menuFrameNode); diff --git a/frameworks/core/components_ng/pattern/overlay/overlay_manager.cpp b/frameworks/core/components_ng/pattern/overlay/overlay_manager.cpp index ccc86f9bcb7..6a082a7822c 100644 --- a/frameworks/core/components_ng/pattern/overlay/overlay_manager.cpp +++ b/frameworks/core/components_ng/pattern/overlay/overlay_manager.cpp @@ -756,7 +756,7 @@ void OverlayManager::PostDialogFinishEvent(const WeakPtr& nodeWk) node->GetLayoutProperty()->UpdateSafeAreaExpandOpts(opts); overlayManager->OnDialogCloseEvent(node); }, - TaskExecutor::TaskType::UI, "ArkUIOverlayDialogCloseEvent"); + TaskExecutor::TaskType::UI, "ArkUIOverlayDialogCloseEvent", PriorityType::VIP); } void OverlayManager::FireAutoSave(const RefPtr& ContainerNode) @@ -1303,7 +1303,7 @@ void OverlayManager::ShowMenuDisappearTransition(const RefPtr& menu) overlayManager->SendToAccessibility(menuWK, false); overlayManager->OnPopMenuAnimationFinished(menuWK, rootWeak, weak, id); }, - TaskExecutor::TaskType::UI, "ArkUIOverlayPopMenuAnimation"); + TaskExecutor::TaskType::UI, "ArkUIOverlayPopMenuAnimation", PriorityType::VIP); } } @@ -1647,7 +1647,7 @@ void OverlayManager::ShowPopup(int32_t targetId, const PopupInfo& popupInfo, CHECK_NULL_VOID(overlayManager); overlayManager->MountPopup(targetId, popupInfo, std::move(callback), interactiveDismiss); }, - TaskExecutor::TaskType::UI, "ArkUIOverlayShowPopup"); + TaskExecutor::TaskType::UI, "ArkUIOverlayShowPopup", PriorityType::VIP); } else { MountPopup(targetId, popupInfo, std::move(onWillDismiss), interactiveDismiss); } @@ -5062,7 +5062,7 @@ void OverlayManager::PlayBubbleStyleSheetTransition(RefPtr sheetNode, overlayManager->RemoveChildWithService(root, sheetParent); root->MarkDirtyNode(PROPERTY_UPDATE_MEASURE_SELF); }, - TaskExecutor::TaskType::UI, "ArkUIOverlaySheetExitingAnimation"); + TaskExecutor::TaskType::UI, "ArkUIOverlaySheetExitingAnimation", PriorityType::VIP); }); } } @@ -6669,7 +6669,7 @@ void OverlayManager::RemoveGatherNodeWithAnimation() rootNode->RemoveChild(frameNode); rootNode->MarkDirtyNode(PROPERTY_UPDATE_BY_CHILD_REQUEST); }, - TaskExecutor::TaskType::UI, "ArkUIOverlayRemoveGatherNodeEvent"); + TaskExecutor::TaskType::UI, "ArkUIOverlayRemoveGatherNodeEvent", PriorityType::VIP); }); gatherNodeWeak_ = nullptr; hasGatherNode_ = false; diff --git a/frameworks/core/components_ng/pattern/select/select_pattern.cpp b/frameworks/core/components_ng/pattern/select/select_pattern.cpp index 1a34276db9f..e79235d3e67 100644 --- a/frameworks/core/components_ng/pattern/select/select_pattern.cpp +++ b/frameworks/core/components_ng/pattern/select/select_pattern.cpp @@ -1524,7 +1524,7 @@ void SelectPattern::OnLanguageConfigurationUpdate() } }, - TaskExecutor::TaskType::UI, "ArkUISelectLanguageConfigUpdate"); + TaskExecutor::TaskType::UI, "ArkUISelectLanguageConfigUpdate", PriorityType::VIP); } Dimension SelectPattern::GetFontSize() diff --git a/interfaces/napi/kits/promptaction/prompt_action.cpp b/interfaces/napi/kits/promptaction/prompt_action.cpp index f2083e39438..427d7295c27 100644 --- a/interfaces/napi/kits/promptaction/prompt_action.cpp +++ b/interfaces/napi/kits/promptaction/prompt_action.cpp @@ -1564,7 +1564,7 @@ napi_value JSPromptShowDialog(napi_env env, napi_callback_info info) } napi_close_handle_scope(asyncContext->env, scope); }, - TaskExecutor::TaskType::JS, "ArkUIDialogParseDialogCallback"); + TaskExecutor::TaskType::JS, "ArkUIDialogParseDialogCallback", PriorityType::VIP); asyncContext = nullptr; }; @@ -1782,7 +1782,7 @@ napi_value JSPromptShowActionMenu(napi_env env, napi_callback_info info) } napi_close_handle_scope(asyncContext->env, scope); }, - TaskExecutor::TaskType::JS, "ArkUIDialogParseActionMenuCallback"); + TaskExecutor::TaskType::JS, "ArkUIDialogParseActionMenuCallback", PriorityType::VIP); asyncContext = nullptr; }; @@ -2129,7 +2129,7 @@ void ParseCustomDialogContentCallback(std::shared_ptr& async } napi_close_handle_scope(asyncContext->env, scope); }, - TaskExecutor::TaskType::JS, "ArkUIDialogParseCustomDialogContentCallback"); + TaskExecutor::TaskType::JS, "ArkUIDialogParseCustomDialogContentCallback", PriorityType::VIP); asyncContext = nullptr; }; } @@ -2181,7 +2181,7 @@ void ParseCustomDialogIdCallback(std::shared_ptr& asyncConte } napi_close_handle_scope(asyncContext->env, scope); }, - TaskExecutor::TaskType::JS, "ArkUIDialogParseCustomDialogIdCallback"); + TaskExecutor::TaskType::JS, "ArkUIDialogParseCustomDialogIdCallback", PriorityType::VIP); asyncContext = nullptr; }; } -- Gitee