From 208bc22398057deb261222131225a36d1c8a48f4 Mon Sep 17 00:00:00 2001 From: Science Date: Thu, 26 Oct 2023 06:50:28 +0000 Subject: [PATCH 1/7] modify log Signed-off-by: Science Change-Id: I3caf1f94a1ec7d8fd694c234c5f9b79c7640657e --- .../manager/drag_drop/drag_drop_manager.cpp | 85 ------------------- 1 file changed, 85 deletions(-) diff --git a/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp b/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp index e649e05bd22..baa4907d34d 100644 --- a/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp +++ b/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp @@ -51,11 +51,6 @@ RefPtr DragDropManager::CreateAndShowDragWindow( SetIsDragged(true); isDragCancel_ = false; #if !defined(PREVIEW) - if (dragWindow_) { - LOGW("CreateAndShowDragWindow: There is a drag window, create drag window failed."); - return nullptr; - } - CreateDragWindow(info, pixelMap->GetWidth(), pixelMap->GetHeight()); if (!dragWindow_) { return nullptr; @@ -75,7 +70,6 @@ RefPtr DragDropManager::CreateAndShowDragWindow( isDragCancel_ = false; #if !defined(PREVIEW) if (dragWindow_) { - LOGW("CreateAndShowDragWindow: There is a drag window, create drag window failed."); return nullptr; } @@ -103,7 +97,6 @@ RefPtr DragDropManager::CreateTextDragDropProxy() void DragDropManager::CreateDragWindow(const GestureEvent& info, uint32_t width, uint32_t height) { - LOGI("CreateDragWindow"); #if !defined(PREVIEW) auto pipeline = PipelineContext::GetCurrentContext(); CHECK_NULL_VOID(pipeline); @@ -113,8 +106,6 @@ void DragDropManager::CreateDragWindow(const GestureEvent& info, uint32_t width, static_cast(info.GetGlobalPoint().GetY()) + rect.Top(), width, height); if (dragWindow_) { dragWindow_->SetOffset(rect.Left(), rect.Top()); - } else { - LOGE("dragWindow create failed!"); } #endif } @@ -195,7 +186,6 @@ RefPtr DragDropManager::FindTargetInChildNodes( for (auto iter = children.rbegin(); iter != children.rend(); iter++) { auto child = *iter; if (child == nullptr) { - LOGW("when findding target in child nodes, find child is nullptr"); continue; } auto childFindResult = FindTargetInChildNodes(child, hitFrameNodes, findDrop); @@ -214,9 +204,6 @@ RefPtr DragDropManager::FindTargetInChildNodes( if (eventHub->HasOnDrop() || eventHub->HasOnItemDrop() || eventHub->HasCustomerOnDrop()) { return parentFrameNode; } - if (SystemProperties::GetDebugEnabled()) { - LOGW("Iter is in hitFrameNodes, but findDrop not suit with bind function."); - } } } return nullptr; @@ -244,9 +231,6 @@ RefPtr DragDropManager::FindDragFrameNodeByPosition( } if (frameNodes.empty()) { - if (SystemProperties::GetDebugEnabled()) { - LOGW("FrameNodes which have onDragMove or onDrop set is empty, cannot find targetNode."); - } return nullptr; } @@ -269,9 +253,6 @@ RefPtr DragDropManager::FindDragFrameNodeByPosition( } if (hitFrameNodes.empty()) { - if (SystemProperties::GetDebugEnabled()) { - LOGW("HitFrameNodes vector is empty, cannot find targetNode."); - } return nullptr; } auto pipeline = NG::PipelineContext::GetCurrentContext(); @@ -284,9 +265,6 @@ RefPtr DragDropManager::FindDragFrameNodeByPosition( if (result) { return result; } - if (SystemProperties::GetDebugEnabled()) { - LOGW("Don't find targetNode by position in rootNode, return nullptr."); - } return nullptr; } @@ -319,31 +297,11 @@ void DragDropManager::OnDragStart(const Point& point, const RefPtr& f CHECK_NULL_VOID(frameNode); preTargetFrameNode_ = frameNode; draggedFrameNode_ = preTargetFrameNode_; - if (SystemProperties::GetDebugEnabled()) { - LOGI("DragDropManager onDragStart. Dragged frameNode is %{public}s, depth is %{public}d.", - frameNode->GetTag().c_str(), frameNode->GetDepth()); - } } void DragDropManager::PrintDragFrameNode(const Point& point, const RefPtr& dragFrameNode) { CHECK_NULL_VOID(dragFrameNode); - if (SystemProperties::GetDebugEnabled()) { - if (preTargetFrameNode_) { - LOGI("Position is %{public}f and %{public}f.", - static_cast(point.GetX()), static_cast(point.GetY())); - LOGI("PreTargetFrameNode is %{public}s, depth is %{public}d.", - preTargetFrameNode_->GetTag().c_str(), preTargetFrameNode_->GetDepth()); - LOGI("New find targetNode is %{public}s, depth is %{public}d.", - dragFrameNode->GetTag().c_str(), dragFrameNode->GetDepth()); - } else { - LOGI("Position is %{public}f and %{public}f.", - static_cast(point.GetX()), static_cast(point.GetY())); - LOGI("PreTargetFrameNode is nullptr."); - LOGI("New find targetNode is %{public}s, depth is %{public}d.", - dragFrameNode->GetTag().c_str(), dragFrameNode->GetDepth()); - } - } } void DragDropManager::OnDragMove(const Point& point, const std::string& extraInfo) @@ -352,7 +310,6 @@ void DragDropManager::OnDragMove(const Point& point, const std::string& extraInf auto container = Container::Current(); if (container && container->IsScenceBoardWindow()) { if (IsDragged() && IsWindowConsumed()) { - LOGD("The event does not need to be handled"); SetIsWindowConsumed(false); return; } @@ -416,14 +373,10 @@ void DragDropManager::OnDragEnd(const Point& point, const std::string& extraInfo auto container = Container::Current(); if (container && container->IsScenceBoardWindow()) { if (IsDragged() && IsWindowConsumed()) { - LOGD("The event does not need to be handled"); return; } } if (isDragCancel_) { - if (SystemProperties::GetDebugEnabled()) { - LOGI("DragDropManager is dragCancel, finish drag."); - } InteractionManager::GetInstance()->SetDragWindowVisible(false); InteractionManager::GetInstance()->StopDrag(DragResult::DRAG_CANCEL, false); summaryMap_.clear(); @@ -434,21 +387,8 @@ void DragDropManager::OnDragEnd(const Point& point, const std::string& extraInfo UpdateVelocityTrackerPoint(point, true); auto dragFrameNode = FindDragFrameNodeByPosition( static_cast(point.GetX()), static_cast(point.GetY()), DragType::COMMON, true); - if (SystemProperties::GetDebugEnabled()) { - if (dragFrameNode) { - LOGI("Position is %{public}f and %{public}f. TargetNode is %{public}s.", - static_cast(point.GetX()), static_cast(point.GetY()), - dragFrameNode->GetTag().c_str()); - } else { - LOGI("Position is %{public}f and %{public}f. TargetNode is nullptr.", - static_cast(point.GetX()), static_cast(point.GetY())); - } - } #ifdef ENABLE_DRAG_FRAMEWORK if (!dragFrameNode) { - if (SystemProperties::GetDebugEnabled()) { - LOGW("DragDropManager onDragEnd, not find drop target, stop drag."); - } InteractionManager::GetInstance()->StopDrag(DragResult::DRAG_FAIL, isMouseDragged_); summaryMap_.clear(); return; @@ -465,10 +405,6 @@ void DragDropManager::OnDragEnd(const Point& point, const std::string& extraInfo ClearVelocityInfo(); #ifdef ENABLE_DRAG_FRAMEWORK SetIsDragged(false); - if (SystemProperties::GetDebugEnabled()) { - LOGI("DragDropManager finish drop, start do drop animation. UseCustomAnimation is %{public}d.", - event->IsUseCustomAnimation()); - } auto pipeline = PipelineContext::GetCurrentContext(); CHECK_NULL_VOID(pipeline); auto dragResult = TranslateDragResult(event->GetResult()); @@ -488,18 +424,8 @@ void DragDropManager::RequireSummary() { std::string udKey; InteractionManager::GetInstance()->GetUdKey(udKey); - if (SystemProperties::GetDebugEnabled()) { - if (udKey.empty()) { - LOGW("Requiry summary get empty udKey."); - } else { - LOGI("Requiry summary get udKey %{public}s", udKey.c_str()); - } - } std::map summary; int32_t ret = UdmfClient::GetInstance()->GetSummary(udKey, summary); - if (ret != 0) { - LOGW("OnDragStart: UDMF GetSummary failed: %{public}d", ret); - } previewRect_ = Rect(-1, -1, -1, -1); summaryMap_ = summary; } @@ -524,8 +450,6 @@ Rect DragDropManager::GetDragWindowRect(const Point& point) int retOffset = InteractionManager::GetInstance()->GetShadowOffset(x, y, width, height); if (retOffset == 0) { previewRect_ = Rect(x, y, width, height); - } else if (SystemProperties::GetDebugEnabled()) { - LOGW("InteractionManager GetShadowOffset is failed:%{public}d", retOffset); } } return previewRect_ + Offset(point.GetX(), point.GetY()); @@ -549,7 +473,6 @@ void DragDropManager::OnTextDragEnd(float globalX, float globalY, const std::str textFieldPattern->InsertValue(extraInfo); } } - LOGI("OnTextDragEnd"); SetIsDragged(false); currentId_ = -1; } @@ -868,10 +791,6 @@ void DragDropManager::GetExtraInfoFromClipboard(std::string& extraInfo) } extraInfo = extraInfo_; - if (SystemProperties::GetDebugEnabled()) { - LOGI("DragDropManager get extra info from clipBoard, extraInfo is %{public}s", - extraInfo_.c_str()); - } } void DragDropManager::RestoreClipboardData() @@ -915,7 +834,6 @@ void DragDropManager::DestroyDragWindow() if (dragWindowRootNode_) { dragWindowRootNode_ = nullptr; } - LOGI("DestroyDragWindow"); SetIsDragged(false); SetIsDragWindowShow(false); previewRect_ = Rect(-1, -1, -1, -1); @@ -945,7 +863,6 @@ void DragDropManager::UpdateDragEvent(RefPtr& event, const std::string udKey; InteractionManager::GetInstance()->GetUdKey(udKey); if (udKey.empty()) { - LOGW("InteractionManager GetUdkey is null"); event->SetIsGetDataSuccess(false); } else { event->SetUdKey(udKey); @@ -953,7 +870,6 @@ void DragDropManager::UpdateDragEvent(RefPtr& event, const RefPtr udData = UdmfClient::GetInstance()->CreateUnifiedData(); int ret = UdmfClient::GetInstance()->GetData(udData, udKey); if (ret != 0) { - LOGW("UDMF GetData failed: %{public}d", ret); event->SetIsGetDataSuccess(false); } else { event->SetIsGetDataSuccess(true); @@ -972,7 +888,6 @@ void DragDropManager::UpdateDragEvent(RefPtr& event, const } else { previewRect_ = Rect(x, y, width, height); event->SetPreviewRect(previewRect_); - LOGW("InteractionManager GetShadowOffset is failed:%{public}d", retOffset); } #endif // ENABLE_DRAG_FRAMEWORK } -- Gitee From 7b09ad9548c83dc37508ad1ffa8ef2ddcbedcf23 Mon Sep 17 00:00:00 2001 From: Science Date: Thu, 26 Oct 2023 08:37:24 +0000 Subject: [PATCH 2/7] Signed-off-by: Science Change-Id: I36dd8c0786b6aa4ae0df3fbfc6d09e819c3a1a0d Signed-off-by: Science Change-Id: Iae0cb681d89c83d291b49eab435b6042306a76c6 --- .../components_ng/manager/drag_drop/drag_drop_manager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp b/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp index ce29357257c..abbe70a7ef9 100644 --- a/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp +++ b/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp @@ -527,7 +527,7 @@ void DragDropManager::RequireSummary() std::string udKey; InteractionInterface::GetInstance()->GetUdKey(udKey); std::map summary; - int32_t ret = UdmfClient::GetInstance()->GetSummary(udKey, summary); + UdmfClient::GetInstance()->GetSummary(udKey, summary); previewRect_ = Rect(-1, -1, -1, -1); summaryMap_ = summary; } @@ -555,8 +555,11 @@ Rect DragDropManager::GetDragWindowRect(const Point& point) previewRect_ = Rect(x, y, width, height); } } + return previewRect_ + Offset(point.GetX(), point.GetY()); } +void DragDropManager::ClearSummary() +{ previewRect_ = Rect(-1, -1, -1, -1); summaryMap_.clear(); parentHitNodes_.clear(); -- Gitee From 7bef36056bf374f029ae2aabbb0993c4b26d0ed5 Mon Sep 17 00:00:00 2001 From: Science Date: Thu, 26 Oct 2023 13:01:31 +0000 Subject: [PATCH 3/7] Signed-off-by: Science Change-Id: Iae0cb681d89c83d291b49eab435b6042306a76c6 Signed-off-by: Science Change-Id: I99c2411547ff93c6724ef96dfdc657a0d92e0c8f --- .../manager/drag_drop/drag_drop_manager.cpp | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp b/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp index abbe70a7ef9..84ee6572b64 100644 --- a/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp +++ b/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp @@ -254,6 +254,7 @@ RefPtr DragDropManager::FindDragFrameNodeByPosition( } if (hitFrameNodes.empty()) { + TAG_LOGI(AceLogTag::ACE_DRAG, "Cannot find targetNodes."); return nullptr; } auto pipeline = NG::PipelineContext::GetCurrentContext(); @@ -460,6 +461,9 @@ void DragDropManager::OnDragEnd(const Point& point, const std::string& extraInfo } } if (isDragCancel_) { + if (SystemProperties::GetDebugEnabled()) { + LOGI("DragDropManager is dragCancel, finish drag. WindowId is %{public}d.", container->GetWindowId()); + } InteractionInterface::GetInstance()->SetDragWindowVisible(false); DragDropRet dragDropRet { DragRet::DRAG_CANCEL, false, container->GetWindowId() }; InteractionInterface::GetInstance()->StopDrag(dragDropRet); @@ -476,8 +480,22 @@ void DragDropManager::OnDragEnd(const Point& point, const std::string& extraInfo UpdateVelocityTrackerPoint(point, true); auto dragFrameNode = FindDragFrameNodeByPosition( static_cast(point.GetX()), static_cast(point.GetY()), DragType::COMMON, true); + if (SystemProperties::GetDebugEnabled()) { + if (dragFrameNode) { + TAG_LOGI(AceLogTag::ACE_DRAG, "Position is %{public}f and %{public}f. TargetNode is %{public}s.", + static_cast(point.GetX()), static_cast(point.GetY()), + dragFrameNode->GetTag().c_str()); + } else { + TAG_LOGI(AceLogTag::ACE_DRAG, "Position is %{public}f and %{public}f. TargetNode is nullptr.", + static_cast(point.GetX()), static_cast(point.GetY())); + } + } #ifdef ENABLE_DRAG_FRAMEWORK if (!dragFrameNode) { + if (SystemProperties::GetDebugEnabled()) { + TAG_LOGI(AceLogTag::ACE_DRAG, "DragDropManager onDragEnd, not find drop target, stop drag. WindowId is %{public}d.", + container->GetWindowId()); + } DragDropRet dragDropRet { DragRet::DRAG_FAIL, isMouseDragged_, container->GetWindowId() }; InteractionInterface::GetInstance()->StopDrag(dragDropRet); RefPtr notifyEvent = AceType::MakeRefPtr(); @@ -500,6 +518,10 @@ void DragDropManager::OnDragEnd(const Point& point, const std::string& extraInfo ClearVelocityInfo(); #ifdef ENABLE_DRAG_FRAMEWORK SetIsDragged(false); + if (SystemProperties::GetDebugEnabled()) { + TAG_LOGI(AceLogTag::ACE_DRAG, "DragDropManager finish drop, start do drop animation. UseCustomAnimation is %{public}d." + " WindowId is %{public}d.", event->IsUseCustomAnimation(), container->GetWindowId()); + } auto pipeline = PipelineContext::GetCurrentContext(); CHECK_NULL_VOID(pipeline); auto dragResult = event->GetResult(); @@ -527,7 +549,10 @@ void DragDropManager::RequireSummary() std::string udKey; InteractionInterface::GetInstance()->GetUdKey(udKey); std::map summary; - UdmfClient::GetInstance()->GetSummary(udKey, summary); + int32_t ret = UdmfClient::GetInstance()->GetSummary(udKey, summary); + if (ret != 0) { + LOGW("OnDragStart: UDMF GetSummary failed: %{public}d", ret); + } previewRect_ = Rect(-1, -1, -1, -1); summaryMap_ = summary; } -- Gitee From 4e680da0f189af4d54f1fec581c5b14e7b6d5319 Mon Sep 17 00:00:00 2001 From: Science Date: Fri, 27 Oct 2023 01:47:25 +0000 Subject: [PATCH 4/7] Signed-off-by: Science Change-Id: I99c2411547ff93c6724ef96dfdc657a0d92e0c8f Signed-off-by: Science Change-Id: I69c847e56352e2b2d05b593646d9290de6e3d880 --- .../manager/drag_drop/drag_drop_manager.cpp | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp b/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp index 84ee6572b64..4276475f5dc 100644 --- a/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp +++ b/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp @@ -254,7 +254,9 @@ RefPtr DragDropManager::FindDragFrameNodeByPosition( } if (hitFrameNodes.empty()) { - TAG_LOGI(AceLogTag::ACE_DRAG, "Cannot find targetNodes."); + if (SystemProperties::GetDebugEnabled()) { + TAG_LOGE(AceLogTag::ACE_DRAG, "Cannot find targetNodes."); + } return nullptr; } auto pipeline = NG::PipelineContext::GetCurrentContext(); @@ -379,7 +381,7 @@ void DragDropManager::NotifyDragRegisterFrameNode(std::unordered_mapGetPattern(); CHECK_NULL_VOID(pattern); if (SystemProperties::GetDebugEnabled()) { - LOGI("DragDropManager NotifyDragRegisterFrameNode. Dragged frameNode is %{public}s, depth is %{public}d, " + TAG_LOGI(AceLogTag::ACE_DRAG, "DragDropManager NotifyDragRegisterFrameNode. Dragged frameNode is %{public}s, depth is %{public}d, " "DragEventType is %{public}d.", frameNode->GetTag().c_str(), frameNode->GetDepth(), static_cast(dragEventType)); } @@ -401,6 +403,22 @@ void DragDropManager::OnDragStart(const Point& point, const RefPtr& f void DragDropManager::PrintDragFrameNode(const Point& point, const RefPtr& dragFrameNode) { CHECK_NULL_VOID(dragFrameNode); + if (SystemProperties::GetDebugEnabled()) { + if (preTargetFrameNode_) { + TAG_LOGI(AceLogTag::ACE_DRAG, "Position is %{public}f and %{public}f.", + static_cast(point.GetX()), static_cast(point.GetY())); + TAG_LOGI(AceLogTag::ACE_DRAG, "PreTargetFrameNode is %{public}s, depth is %{public}d.", + preTargetFrameNode_->GetTag().c_str(), preTargetFrameNode_->GetDepth()); + TAG_LOGI(AceLogTag::ACE_DRAG, "New find targetNode is %{public}s, depth is %{public}d.", + dragFrameNode->GetTag().c_str(), dragFrameNode->GetDepth()); + } else { + TAG_LOGI(AceLogTag::ACE_DRAG, "Position is %{public}f and %{public}f.", + static_cast(point.GetX()), static_cast(point.GetY())); + TAG_LOGI(AceLogTag::ACE_DRAG, "PreTargetFrameNode is nullptr."); + TAG_LOGI(AceLogTag::ACE_DRAG, "New find targetNode is %{public}s, depth is %{public}d.", + dragFrameNode->GetTag().c_str(), dragFrameNode->GetDepth()); + } + } } void DragDropManager::OnDragMove(const Point& point, const std::string& extraInfo) @@ -419,9 +437,9 @@ void DragDropManager::OnDragMove(const Point& point, const std::string& extraInf UpdateDragListener(point); auto dragFrameNode = FindDragFrameNodeByPosition( static_cast(point.GetX()), static_cast(point.GetY()), DragType::COMMON, false); - PrintDragFrameNode(point, dragFrameNode); if (!dragFrameNode) { if (preTargetFrameNode_) { + PrintDragFrameNode(point, dragFrameNode); FireOnDragEvent(preTargetFrameNode_, point, DragEventType::LEAVE, extraInfo); preTargetFrameNode_ = nullptr; } @@ -442,9 +460,11 @@ void DragDropManager::OnDragMove(const Point& point, const std::string& extraInf if (preTargetFrameNode_) { auto preRect = preTargetFrameNode_->GetTransformRectRelativeToWindow(); if (!preRect.IsInRegion(PointF(static_cast(point.GetX()), static_cast(point.GetY())))) { + PrintDragFrameNode(point, dragFrameNode); FireOnDragEvent(preTargetFrameNode_, point, DragEventType::LEAVE, extraInfo); } } + PrintDragFrameNode(point, dragFrameNode); FireOnDragEvent(dragFrameNode, point, DragEventType::ENTER, extraInfo); preTargetFrameNode_ = dragFrameNode; } @@ -462,7 +482,8 @@ void DragDropManager::OnDragEnd(const Point& point, const std::string& extraInfo } if (isDragCancel_) { if (SystemProperties::GetDebugEnabled()) { - LOGI("DragDropManager is dragCancel, finish drag. WindowId is %{public}d.", container->GetWindowId()); + TAG_LOGI(AceLogTag::ACE_DRAG, "DragDropManager is dragCancel, finish drag. WindowId is %{public}d.", + container->GetWindowId()); } InteractionInterface::GetInstance()->SetDragWindowVisible(false); DragDropRet dragDropRet { DragRet::DRAG_CANCEL, false, container->GetWindowId() }; @@ -493,7 +514,7 @@ void DragDropManager::OnDragEnd(const Point& point, const std::string& extraInfo #ifdef ENABLE_DRAG_FRAMEWORK if (!dragFrameNode) { if (SystemProperties::GetDebugEnabled()) { - TAG_LOGI(AceLogTag::ACE_DRAG, "DragDropManager onDragEnd, not find drop target, stop drag. WindowId is %{public}d.", + TAG_LOGW(AceLogTag::ACE_DRAG, "DragDropManager onDragEnd, not find drop target, stop drag. WindowId is %{public}d.", container->GetWindowId()); } DragDropRet dragDropRet { DragRet::DRAG_FAIL, isMouseDragged_, container->GetWindowId() }; -- Gitee From 0762f57a4dfb10c1aa8205aad1e6fd8ce7b4d8dc Mon Sep 17 00:00:00 2001 From: Science Date: Fri, 27 Oct 2023 02:16:44 +0000 Subject: [PATCH 5/7] Signed-off-by: Science Change-Id: I69c847e56352e2b2d05b593646d9290de6e3d880 Signed-off-by: Science Change-Id: Ib7cb01b5b60119643f772dba6c539894260d1ee0 --- .../manager/drag_drop/drag_drop_manager.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp b/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp index 4276475f5dc..e7e39d189c8 100644 --- a/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp +++ b/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp @@ -381,8 +381,9 @@ void DragDropManager::NotifyDragRegisterFrameNode(std::unordered_mapGetPattern(); CHECK_NULL_VOID(pattern); if (SystemProperties::GetDebugEnabled()) { - TAG_LOGI(AceLogTag::ACE_DRAG, "DragDropManager NotifyDragRegisterFrameNode. Dragged frameNode is %{public}s, depth is %{public}d, " - "DragEventType is %{public}d.", + TAG_LOGI(AceLogTag::ACE_DRAG, + "DragDropManager NotifyDragRegisterFrameNode. Dragged frameNode is %{public}s, depth is %{public}d, " + "DragEventType is %{public}d.", frameNode->GetTag().c_str(), frameNode->GetDepth(), static_cast(dragEventType)); } pattern->HandleOnDragStatusCallback(dragEventType, notifyEvent); @@ -514,7 +515,8 @@ void DragDropManager::OnDragEnd(const Point& point, const std::string& extraInfo #ifdef ENABLE_DRAG_FRAMEWORK if (!dragFrameNode) { if (SystemProperties::GetDebugEnabled()) { - TAG_LOGW(AceLogTag::ACE_DRAG, "DragDropManager onDragEnd, not find drop target, stop drag. WindowId is %{public}d.", + TAG_LOGW(AceLogTag::ACE_DRAG, + "DragDropManager onDragEnd, not find drop target, stop drag. WindowId is %{public}d.", container->GetWindowId()); } DragDropRet dragDropRet { DragRet::DRAG_FAIL, isMouseDragged_, container->GetWindowId() }; @@ -540,7 +542,8 @@ void DragDropManager::OnDragEnd(const Point& point, const std::string& extraInfo #ifdef ENABLE_DRAG_FRAMEWORK SetIsDragged(false); if (SystemProperties::GetDebugEnabled()) { - TAG_LOGI(AceLogTag::ACE_DRAG, "DragDropManager finish drop, start do drop animation. UseCustomAnimation is %{public}d." + TAG_LOGI(AceLogTag::ACE_DRAG, + "DragDropManager finish drop, start do drop animation. UseCustomAnimation is %{public}d." " WindowId is %{public}d.", event->IsUseCustomAnimation(), container->GetWindowId()); } auto pipeline = PipelineContext::GetCurrentContext(); -- Gitee From 0dd8227dc17852103f785030c987349dba5ac047 Mon Sep 17 00:00:00 2001 From: Science Date: Fri, 27 Oct 2023 02:52:34 +0000 Subject: [PATCH 6/7] Signed-off-by: Science Change-Id: I69c847e56352e2b2d05b593646d9290de6e3d880 Signed-off-by: Science Change-Id: Ic845146a41f37185fd2de43f33ed094f0c6ac05e --- .../core/components_ng/manager/drag_drop/drag_drop_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp b/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp index e7e39d189c8..99d37d9e4e1 100644 --- a/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp +++ b/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp @@ -542,7 +542,7 @@ void DragDropManager::OnDragEnd(const Point& point, const std::string& extraInfo #ifdef ENABLE_DRAG_FRAMEWORK SetIsDragged(false); if (SystemProperties::GetDebugEnabled()) { - TAG_LOGI(AceLogTag::ACE_DRAG, + TAG_LOGI(AceLogTag::ACE_DRAG, "DragDropManager finish drop, start do drop animation. UseCustomAnimation is %{public}d." " WindowId is %{public}d.", event->IsUseCustomAnimation(), container->GetWindowId()); } -- Gitee From abdbb12da8d93a77b3bf77221aa554ee87a566b4 Mon Sep 17 00:00:00 2001 From: Science Date: Wed, 1 Nov 2023 01:53:16 +0000 Subject: [PATCH 7/7] Signed-off-by: Science Change-Id: Ic845146a41f37185fd2de43f33ed094f0c6ac05e Signed-off-by: Science Change-Id: I752d2d8e7d7ca9649af4bdda7aabd42748cc50d4 --- .../manager/drag_drop/drag_drop_manager.cpp | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp b/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp index 99d37d9e4e1..e5694012ca8 100644 --- a/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp +++ b/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp @@ -255,7 +255,7 @@ RefPtr DragDropManager::FindDragFrameNodeByPosition( if (hitFrameNodes.empty()) { if (SystemProperties::GetDebugEnabled()) { - TAG_LOGE(AceLogTag::ACE_DRAG, "Cannot find targetNodes."); + TAG_LOGI(AceLogTag::ACE_DRAG, "Cannot find targetNodes."); } return nullptr; } @@ -382,7 +382,7 @@ void DragDropManager::NotifyDragRegisterFrameNode(std::unordered_mapGetTag().c_str(), frameNode->GetDepth(), static_cast(dragEventType)); } @@ -406,17 +406,17 @@ void DragDropManager::PrintDragFrameNode(const Point& point, const RefPtr(point.GetX()), static_cast(point.GetY())); - TAG_LOGI(AceLogTag::ACE_DRAG, "PreTargetFrameNode is %{public}s, depth is %{public}d.", - preTargetFrameNode_->GetTag().c_str(), preTargetFrameNode_->GetDepth()); - TAG_LOGI(AceLogTag::ACE_DRAG, "New find targetNode is %{public}s, depth is %{public}d.", + TAG_LOGI(AceLogTag::ACE_DRAG,"Drag Position is %{public}f and %{public}f, " + "PreTargetFrameNode is %{public}s, depth is %{public}d, " + "New find targetNode is %{public}s, depth is %{public}d.", + static_cast(point.GetX()), static_cast(point.GetY()), + preTargetFrameNode_->GetTag().c_str(), preTargetFrameNode_->GetDepth(), dragFrameNode->GetTag().c_str(), dragFrameNode->GetDepth()); } else { - TAG_LOGI(AceLogTag::ACE_DRAG, "Position is %{public}f and %{public}f.", - static_cast(point.GetX()), static_cast(point.GetY())); - TAG_LOGI(AceLogTag::ACE_DRAG, "PreTargetFrameNode is nullptr."); - TAG_LOGI(AceLogTag::ACE_DRAG, "New find targetNode is %{public}s, depth is %{public}d.", + TAG_LOGI(AceLogTag::ACE_DRAG, "Drag Position is %{public}f and %{public}f, " + "PreTargetFrameNode is nullptr, " + "New find targetNode is %{public}s, depth is %{public}d.", + static_cast(point.GetX()), static_cast(point.GetY()), dragFrameNode->GetTag().c_str(), dragFrameNode->GetDepth()); } } @@ -440,7 +440,6 @@ void DragDropManager::OnDragMove(const Point& point, const std::string& extraInf static_cast(point.GetX()), static_cast(point.GetY()), DragType::COMMON, false); if (!dragFrameNode) { if (preTargetFrameNode_) { - PrintDragFrameNode(point, dragFrameNode); FireOnDragEvent(preTargetFrameNode_, point, DragEventType::LEAVE, extraInfo); preTargetFrameNode_ = nullptr; } -- Gitee