diff --git a/adapter/ohos/entrance/ui_content_impl.cpp b/adapter/ohos/entrance/ui_content_impl.cpp index 0d6e7bb4215..8e1913f5372 100644 --- a/adapter/ohos/entrance/ui_content_impl.cpp +++ b/adapter/ohos/entrance/ui_content_impl.cpp @@ -2907,24 +2907,6 @@ void UIContentImpl::RecoverForm(const std::string& statusData) return pipeline->OnFormRecover(statusData); } -void UIContentImpl::RemoveOldPopInfoIfExsited(bool isShowInSubWindow, int32_t nodeId) -{ - auto pipeline = NG::PipelineContext::GetCurrentContext(); - CHECK_NULL_VOID(pipeline); - auto overlayManager = pipeline->GetOverlayManager(); - if (isShowInSubWindow) { - auto subwindow = SubwindowManager::GetInstance()->GetSubwindow(Container::CurrentId()); - CHECK_NULL_VOID(subwindow); - overlayManager = subwindow->GetOverlayManager(); - } - - CHECK_NULL_VOID(overlayManager); - if (overlayManager->HasPopupInfo(nodeId)) { - LOGD("Target node id=%{public}d has old popup info, erase it", nodeId); - overlayManager->ErasePopupInfo(nodeId); - } -} - RefPtr UIContentImpl::CreateCustomPopupParam(bool isShow, const CustomPopupUIExtensionConfig& config) { auto popupParam = AceType::MakeRefPtr(); @@ -3005,10 +2987,6 @@ void UIContentImpl::OnPopupStateChange( LOGD("Created custom popup is invisible"); ContainerScope scope(instanceId_); - auto taskExecutor = Container::CurrentTaskExecutor(); - CHECK_NULL_VOID(taskExecutor); - taskExecutor->PostDelayedTask([config, nodeId]() { RemoveOldPopInfoIfExsited(config.isShowInSubWindow, nodeId); }, - TaskExecutor::TaskType::UI, 100, "ArkUIRemoveOldPopupInfo"); // delay 100ms customPopupConfigMap_.erase(nodeId); popupUIExtensionRecords_.erase(nodeId); } @@ -3094,7 +3072,6 @@ void UIContentImpl::DestroyCustomPopupUIExtension(int32_t nodeId) CHECK_NULL_VOID(targetNode); auto popupParam = CreateCustomPopupParam(false, config); NG::ViewAbstract::BindPopup(popupParam, targetNode, nullptr); - RemoveOldPopInfoIfExsited(config.isShowInSubWindow, nodeId); customPopupConfigMap_.erase(nodeId); popupUIExtensionRecords_.erase(nodeId); }, diff --git a/adapter/ohos/entrance/ui_content_impl.h b/adapter/ohos/entrance/ui_content_impl.h index 5415b5923bd..41876079817 100644 --- a/adapter/ohos/entrance/ui_content_impl.h +++ b/adapter/ohos/entrance/ui_content_impl.h @@ -344,7 +344,6 @@ private: void OnPopupStateChange(const std::string& event, const CustomPopupUIExtensionConfig& config, int32_t nodeId); void SetCustomPopupConfig(int32_t nodeId, const CustomPopupUIExtensionConfig& config, int32_t popupId); - static void RemoveOldPopInfoIfExsited(bool isShowInSubWindow, int32_t nodeId); void RenderLayoutBoundary(bool isDebugBoundary); static void EnableSystemParameterTraceLayoutCallback(const char* key, const char* value, void* context); static void EnableSystemParameterTraceInputEventCallback(const char* key, const char* value, void* context);