From ccec0c906435e6f1bc9a8cc19ae2beb69c32e449 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Thu, 19 Mar 2026 16:24:33 +0800 Subject: [PATCH] =?utf8?q?=E6=8E=A5=E8=BF=91=E7=9C=81=E7=94=B5=E7=95=8C?= =?utf8?q?=E9=9D=A2=E5=86=85=E5=AD=98=E6=B3=84=E6=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/calculator/src/CalculatorPresenter.cpp | 2 +- .../nativeui/calendar/src/CalendarPresenter.cpp | 4 ++-- .../nativeui/makephone/src/MainCallingPresenter.cpp | 2 -- .../nativeapp/nativeui/saveele/src/SaveBatView.cpp | 13 ++++++------- .../nativeapp/nativeui/sleep/src/SleepTimeView.cpp | 6 +++--- 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/calculator/src/CalculatorPresenter.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/calculator/src/CalculatorPresenter.cpp index 67fda82e1..37de86716 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/calculator/src/CalculatorPresenter.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/calculator/src/CalculatorPresenter.cpp @@ -155,7 +155,7 @@ bool CalculatorPresenter::OnClick(UIView &view, const ClickEvent &event) bool CalculatorPresenter::OnDragEnd(OHOS::UIView& view, const OHOS::DragEvent& event) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter OnDragEnd"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter OnDragEnd"); if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) { if(event.GetPreLastPoint().x-event.GetStartPoint().x>150) diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/calendar/src/CalendarPresenter.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/calendar/src/CalendarPresenter.cpp index 43766067e..b4c586498 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/calendar/src/CalendarPresenter.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/calendar/src/CalendarPresenter.cpp @@ -52,14 +52,14 @@ namespace OHOS bool CalendarPresenter::OnClick(UIView &view, const ClickEvent &event) { UNUSED(event); - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OnClick"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "OnClick"); return false; } bool CalendarPresenter::OnDragEnd(OHOS::UIView &view, const OHOS::DragEvent &event) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter OnDragEnd"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter OnDragEnd"); if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) { if (event.GetPreLastPoint().x - event.GetStartPoint().x > 100) diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/makephone/src/MainCallingPresenter.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/makephone/src/MainCallingPresenter.cpp index f97e9a3a3..5709289df 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/makephone/src/MainCallingPresenter.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/makephone/src/MainCallingPresenter.cpp @@ -366,8 +366,6 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event) bool MainCallingPresenter::OnDragEnd(OHOS::UIView& view, const OHOS::DragEvent& event) { - - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainCallingPresenter OnDragEnd"); if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) { diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/saveele/src/SaveBatView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/saveele/src/SaveBatView.cpp index a8a4d03be..261299013 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/saveele/src/SaveBatView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/saveele/src/SaveBatView.cpp @@ -335,9 +335,11 @@ namespace OHOS { /* 关闭省电模式 */ uapi_exit_power_saving_mode(); - - // UIViewGroup *tmpGroup = dynamic_cast(group_); - // UIViewGroup::RemoveAndDeleteAllRecursively(tmpGroup); + if (group_) { + group_->RemoveAll(); + delete group_; + group_ = nullptr; + } // 释放所有动态分配的成员变量 if (timelabel) { @@ -403,10 +405,7 @@ namespace OHOS delete restart_; restart_ = nullptr; } - if (group_) { - delete group_; - group_ = nullptr; - } + if (label_) { delete label_; label_ = nullptr; diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/sleep/src/SleepTimeView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/sleep/src/SleepTimeView.cpp index d530629e6..3c970015d 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/sleep/src/SleepTimeView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/sleep/src/SleepTimeView.cpp @@ -12,7 +12,7 @@ static std::string sleepStr; static std::string wakeStr; static constexpr char *upimagePath = "/user/res/Sleep/up.bin"; SleepTimeView::SleepTimeView() { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SleepTimeView::SleepTimeView"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SleepTimeView::SleepTimeView"); SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); SetViewIndex(0); // 视图索引 @@ -20,7 +20,7 @@ SleepTimeView::SleepTimeView() { } SleepTimeView::~SleepTimeView() { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " SleepTimeView::~SleepTimeView"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, " SleepTimeView::~SleepTimeView"); ClearAll(); g_pSleepView = nullptr; @@ -180,7 +180,7 @@ bool SleepTimeView::InitPage(void) { } bool SleepTimeView::InitView(void *caller) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SleepTimeView InitView %p", caller); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SleepTimeView InitView %p", caller); if (InitPage() == false) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SleepTimeView::InitPage fail"); return false; -- 2.17.1