From e690a0e3374b04e5203a511a382a44dc6ea21ad9 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Thu, 15 Jan 2026 18:22:18 +0800 Subject: [PATCH] =?utf8?q?=E8=A7=A3=E5=86=B3GPS=E4=BA=A7=E6=B5=8B=E9=A1=B5?= =?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 --- .../sdk/zhihui/UI/producttest/src/testGPS.cpp | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/code/sdk/zhihui/UI/producttest/src/testGPS.cpp b/code/sdk/zhihui/UI/producttest/src/testGPS.cpp index 98dc41ef5..6268510cf 100644 --- a/code/sdk/zhihui/UI/producttest/src/testGPS.cpp +++ b/code/sdk/zhihui/UI/producttest/src/testGPS.cpp @@ -33,18 +33,33 @@ namespace OHOS { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "testGPSView::~testGPSView"); ClearAll(); - //g_pSystemAboutTheWatchView = nullptr; + g_pSystemAboutTheWatchView = nullptr; } testGPSView *testGPSView::GetInstance() { - return g_pSystemAboutTheWatchView; } static osTimerId_t GPS_TEST_timer=NULL; void testGPSView::ClearAll() { + // 清理主容器 + if(mainContainer) + { + mainContainer->RemoveAll(); + delete mainContainer; + mainContainer=nullptr; + } + + // 清理滚动内容区域 + if(contentScrollView) + { + contentScrollView->RemoveAll(); + delete contentScrollView; + contentScrollView=nullptr; + } + if (GPS_TEST_timer != NULL) { osTimerStop(GPS_TEST_timer); osTimerDelete(GPS_TEST_timer); @@ -95,21 +110,6 @@ namespace OHOS failtestBtn = nullptr; } - // 清理滚动内容区域 - if(contentScrollView) - { - contentScrollView->RemoveAll(); - delete contentScrollView; - contentScrollView=nullptr; - } - - // 清理主容器 - if(mainContainer) - { - mainContainer->RemoveAll(); - delete mainContainer; - mainContainer=nullptr; - } } UILabelButtonExt *testGPSView::SetTheButton_ext(ButtonConfig_ext_t &buttonconfig) -- 2.17.1