From: hcj <1224667075@qq.com> Date: Tue, 31 Dec 2024 10:47:25 +0000 (+0800) Subject: 提交GPS测试 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=32bf89561a352a91728fc0f790358affc967a693;p=mirrors%2FFD230.git 提交GPS测试 --- diff --git a/code/sdk/application/wearable/fd230/nativeapp/CMakeLists.txt b/code/sdk/application/wearable/fd230/nativeapp/CMakeLists.txt index 593c771ae..8207241ab 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/CMakeLists.txt +++ b/code/sdk/application/wearable/fd230/nativeapp/CMakeLists.txt @@ -793,6 +793,8 @@ set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/producttest/src/testSEChipTest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/producttest/src/testModel.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/producttest/src/testPing.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/producttest/src/testGPS.cpp + #每日目标 ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/goal/src/goalmodel.cpp diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/include/testGPS.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/include/testGPS.h new file mode 100644 index 000000000..f95c79be2 --- /dev/null +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/include/testGPS.h @@ -0,0 +1,82 @@ +#ifndef TEST_GPS__VIEW_H +#define TEST_GPS__VIEW_H + +#include "BaseView.h" +#include "View.h" +#include "components/ui_scroll_view.h" +#include "components/ui_label.h" +#include "components/ui_label_ext.h" +#include "components/ui_button.h" +#include "components/ui_image_view.h" +#include "components/ui_label_button_ext.h" + +//#include "cmsis_os.h" +#include +namespace OHOS +{ + #define GPS_CLOSE_CANCEL_BUTTON "gps_close" + #define GPS_OPEN_CONFIRM_BUTTON "gps_open" + + class testGPSView + { + + public: + struct ButtonConfig_ext_t + { + int x; + int y; + int w; + int h; + const char *str; + const char *ViewId; + const char *ImageSrc; + + //label + int label_x; + int label_y; + uint8_t ALIGN; + int Fontsize; + + }; + + + + struct LabelConfig + { + int16_t left; + int16_t top; + int16_t width; + int16_t height; + int16_t fontSize; // 字体大小 + int16_t lineHeigh; // 行高 + char *text; // 文本 + uint8_t lineBreakMode; // 断行模式。 + }; + + + + + testGPSView(); + virtual ~testGPSView(); + static testGPSView *GetInstance(void); + + UIScrollView *testGPSInitIView(uint8_t); + void gpsdataTimerCallBack(void); + + void ClearAll(void); + private: + UILabelButtonExt *SetTheButton_ext(ButtonConfig_ext_t &buttonconfig);//, UIView::OnTouchListener *clickListener); + UILabel *InitLabel(LabelConfig &labelConfig); + bool testGPSScrollViewcrollViewinit(uint8_t); + UIScrollView *testGPSScrollView{nullptr}; + UILabel *label_1_GPS_MSG=NULL; + UILabel *label_1_GPS_on_or_off{nullptr}; + UILabelButtonExt* GPSbutton[2]{nullptr}; + + UILabelButtonExt* labelButton_next = nullptr; + bool initViewStatus{false}; + UILabel *Title{nullptr}; // 标题 + + }; +} +#endif \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/include/testPresenter.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/include/testPresenter.h index dbc7a6c50..e7715dc33 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/include/testPresenter.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/include/testPresenter.h @@ -37,7 +37,9 @@ namespace OHOS CHAR, SPEAK, MOTOR, +#ifdef SUPPORT_CAT1_MODEM CAT1, +#endif BUTTON, MICROPHONE, HRSENSON, @@ -45,6 +47,8 @@ namespace OHOS BTTEST, SEChipTest, PingTest, + + GPSTEST, OLDTEST, DEEPSLEEP, diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/include/testView.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/include/testView.h index 73ac3342b..42fdae162 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/include/testView.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/include/testView.h @@ -29,6 +29,8 @@ #include "producttest/include/testbt.h" #include "producttest/include/testSEChipTest.h" #include "producttest/include/testPing.h" +#include "producttest/include/testGPS.h" + #ifdef SUPPORT_A5133_SERVICE #include "producttest/include/testA5133.h" #endif @@ -96,6 +98,7 @@ namespace OHOS bool ChangeBTTESTView(int16_t thisView); bool ChangeSEChipTESTView(int16_t thisView); bool ChangePingTESTView(int16_t thisView); + bool ChangeGPSTESTView(int16_t thisView); #ifdef SUPPORT_A5133_SERVICE bool ChangeA5133TESTView(int16_t thisView); #endif @@ -123,7 +126,9 @@ namespace OHOS testCHANINGView *test_charging_view{nullptr}; testSPEAKView *test_speak_view{nullptr}; testMOTORView *test_motor_view{nullptr}; - testcat1View *test_cat1_view{nullptr}; + #ifdef SUPPORT_CAT1_MODEM + testcat1View *test_cat1_view{nullptr}; + #endif testbuttonView *test_KEY_view{nullptr}; testMagicView *test_MG_view{nullptr}; testhrsenson1View *test_hr_view{nullptr}; @@ -135,6 +140,7 @@ namespace OHOS testSEChipView *test_SEChip_view{nullptr}; testPingView *test_Ping_view{nullptr}; + testGPSView *test_GPS_view{nullptr}; #ifdef SUPPORT_A5133_SERVICE testA5133View *test_A5133_view{nullptr}; diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testGPS.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testGPS.cpp new file mode 100644 index 000000000..2a7214356 --- /dev/null +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testGPS.cpp @@ -0,0 +1,291 @@ +#include "wearable_log.h" +#include "custom_utils.h" +#include "producttest/include/testPresenter.h" +// #include "producttest/include/testcat1.h" +#include "AlarmClockModel.h" +#include "cmsis_os2.h" +#include "NMEA0183.h" +// code/sdk/zhihui/services/gnss/inc/.h + +#include "producttest/include/testView.h" +#include "producttest/include/testGPS.h" +#include "gnss_sample.h" +#include "graphic_service.h" +namespace OHOS +{ + + static testGPSView *g_pSystemAboutTheWatchView{nullptr}; + + testGPSView::testGPSView() + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::SystemAboutTheWatchView"); + g_pSystemAboutTheWatchView = this; + } + + testGPSView::~testGPSView() + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "testGPSView::~testGPSView"); + ClearAll(); + //g_pSystemAboutTheWatchView = nullptr; + } + + testGPSView *testGPSView::GetInstance() + { + + return g_pSystemAboutTheWatchView; + } + static osTimerId_t GPS_TEST_timer=NULL; + + void testGPSView::ClearAll() + { + if(testGPSScrollView) + { + testGPSScrollView->RemoveAll(); + + if (GPS_TEST_timer != NULL) { + osTimerStop(GPS_TEST_timer); + osTimerDelete(GPS_TEST_timer); + GPS_TEST_timer = NULL; + } + if(labelButton_next) + { + delete labelButton_next; + labelButton_next=nullptr; + } + if(label_1_GPS_MSG) + { + delete label_1_GPS_MSG; + label_1_GPS_MSG=nullptr; + } + + if(label_1_GPS_on_or_off) + { + delete label_1_GPS_on_or_off; + label_1_GPS_on_or_off=nullptr; + } + + if(Title) + { + delete Title; + Title=nullptr; + } + + if(GPSbutton[0]) + { + delete GPSbutton[0]; + GPSbutton[0]=nullptr; + } + + if(GPSbutton[0]) + { + delete GPSbutton[1]; + GPSbutton[1]=nullptr; + } + + + + delete testGPSScrollView; + testGPSScrollView=nullptr; + } + } + + UILabelButtonExt *testGPSView::SetTheButton_ext(ButtonConfig_ext_t &buttonconfig) + { + UILabelButtonExt *button = new UILabelButtonExt(); + if (button == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " SystemView::SetTheButton: button new fail!"); + return nullptr; + } + button->SetPosition(buttonconfig.x, buttonconfig.y, buttonconfig.w, buttonconfig.h); + button->SetViewId(buttonconfig.ViewId); + button->SetStyle(STYLE_BACKGROUND_COLOR, Color::Blue().full); + //button->SetStyle(STYLE_BORDER_RADIUS,0); + button->SetStyleForState(STYLE_BACKGROUND_COLOR, Color::Black().full, UIButton::PRESSED); + //button->SetStyleForState(STYLE_BORDER_RADIUS,0, UIButton::PRESSED); + button->SetTouchable(true); + button->SetStyle(STYLE_BACKGROUND_OPA, 0x80); + button->SetText(buttonconfig.str); + button->SetAlign(TEXT_ALIGNMENT_LEFT); + button->SetLabelPosition(buttonconfig.label_x,buttonconfig.label_y ); + button->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, buttonconfig.Fontsize); + UIView:: OnClickListener *touchListener = static_cast(testPresenter::GetInstance()); + button->SetOnClickListener(touchListener); + + return button; + } + + UILabel *testGPSView::InitLabel(LabelConfig &labelConfig) + { + UILabel *label = new UILabel(); + if (label == nullptr) + { + return nullptr; + } + label->SetPosition(labelConfig.left, labelConfig.top, labelConfig.width, labelConfig.height); // 位置大小 + label->SetStyle(STYLE_TEXT_FONT, labelConfig.fontSize); // 字体大小 + label->SetStyle(STYLE_LINE_HEIGHT, labelConfig.lineHeigh); // 字体行高 + label->SetText(labelConfig.text); // 内容 + label->SetLineBreakMode(labelConfig.lineBreakMode); // 断行模式。 + label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_TOP); + label->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, labelConfig.fontSize); + label->SetAlign(TEXT_ALIGNMENT_LEFT); + return label; + } + + static char msgtmp[1024]={0}; + + void testGPSView:: gpsdataTimerCallBack(void) + { + if (label_1_GPS_MSG != nullptr) { + + gps_data_t * gpsdata=getGPSGlobaldata(); + gps_data_t gpsd={0}; + if (gpsdata->last_gps_time_ms>0) + { + memcpy(&gpsd,gpsdata,sizeof(gps_data_t)); + } + memset_s(msgtmp,sizeof(msgtmp),0,sizeof(msgtmp)); + dump_location_data_to_buf(&gpsd,msgtmp,sizeof(msgtmp)); + label_1_GPS_MSG->SetText(msgtmp); + + if (getGnssServerStat()==1) + { + label_1_GPS_on_or_off->SetText("GPS已开启"); + }else{ + label_1_GPS_on_or_off->SetText("GPS已关闭"); + } + } + } + + void gpsdataTimerCallBackproc() + { + GraphicService::GetInstance()->PostGraphicEvent(std::bind(&testGPSView::gpsdataTimerCallBack,testGPSView::GetInstance())); + } + + + bool testGPSView::testGPSScrollViewcrollViewinit(uint8_t id) + { + + testGPSScrollView = new UIScrollView(); + if (testGPSScrollView == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemAboutTheWatchView::testGPSScrollView new fail!"); + return false; + } + testGPSScrollView->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight()); + testGPSScrollView->SetStyle(STYLE_BACKGROUND_OPA, 0xff); + testGPSScrollView->SetStyle(STYLE_BORDER_RADIUS, 0); + testGPSScrollView->SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full); + testGPSScrollView->SetStyle(STYLE_BORDER_COLOR, Color::Yellow().blue); + + LabelConfig Config = { + .left = 50, + .top = 70, + .width = 60, + .height = 35, + .fontSize = 30, + .lineHeigh = 35, + .text = "", + .lineBreakMode = UILabel::LINE_BREAK_ADAPT, + }; + label_1_GPS_MSG= InitLabel(Config); + if (label_1_GPS_MSG == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::SystemAboutTheWatchTitle new fail!"); + return false; + } + testGPSScrollView->Add(label_1_GPS_MSG); + + Config = { + .left = 50, + .top = 320, + .width = 350, + .height = 35, + .fontSize = 30, + .lineHeigh = 35, + .text = "", + .lineBreakMode = UILabel::LINE_BREAK_WRAP, + }; + label_1_GPS_on_or_off= InitLabel(Config); + if (label_1_GPS_on_or_off == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::SystemAboutTheWatchTitle new fail!"); + return false; + } + testGPSScrollView->Add(label_1_GPS_on_or_off); + + + ButtonConfig_ext_t buttonconfig; + buttonconfig.x = 20; + buttonconfig.y = 380; + buttonconfig.w = 180; + buttonconfig.h = 96; + buttonconfig.label_x=40; + buttonconfig.label_y=0; + buttonconfig.Fontsize=30; + buttonconfig.ViewId=GPS_OPEN_CONFIRM_BUTTON; + buttonconfig.str=GPS_OPEN_CONFIRM_BUTTON; + buttonconfig.ALIGN=TEXT_ALIGNMENT_LEFT; + GPSbutton[0]=SetTheButton_ext(buttonconfig); + testGPSScrollView->Add( GPSbutton[0]); + //testcat1ScrollView->Add(button); + + buttonconfig.x = 220; + buttonconfig.y = 380; + buttonconfig.w = 180; + buttonconfig.h = 96; + buttonconfig.label_x=40; + buttonconfig.label_y=0; + buttonconfig.Fontsize=30; + buttonconfig.ViewId=GPS_CLOSE_CANCEL_BUTTON; + buttonconfig.str=GPS_CLOSE_CANCEL_BUTTON; + buttonconfig.ALIGN=TEXT_ALIGNMENT_LEFT; + GPSbutton[1]=SetTheButton_ext(buttonconfig); + testGPSScrollView->Add( GPSbutton[1]); + + + + + UIView::OnDragListener *draglistener = static_cast(testPresenter::GetInstance()); + if (draglistener == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::draglistener can not be nullptr!"); + return false; + } + testGPSScrollView->SetOnDragListener(draglistener); + + + labelButton_next= testAboutView::GetInstance()->init_button_next(267,320,Test_ViewMapper_t[id].viewid_str_next); + testGPSScrollView->Add(labelButton_next); + + Title= testAboutView::GetInstance()->init_title(165,45,"GPS_TEST"); + testGPSScrollView->Add(Title); + + + testGPSScrollView->SetTouchable(true); + testGPSScrollView->SetDraggable(true); + uint32_t tick; + osStatus_t retTimer; + GPS_TEST_timer = osTimerNew((osTimerFunc_t)gpsdataTimerCallBackproc, osTimerPeriodic, NULL, NULL); + tick =2000;// osMs2Tick(1000); + retTimer = osTimerStart(GPS_TEST_timer, tick); + if (retTimer != osOK && GPS_TEST_timer != NULL) { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"StartCallTimer osTimerStart failed, ret = %lx!!", retTimer); + osTimerDelete(GPS_TEST_timer); + GPS_TEST_timer = NULL; + return false; + } + return true; + } + + UIScrollView *testGPSView::testGPSInitIView(uint8_t id) + { + if (!testGPSScrollViewcrollViewinit(id)) + { + return nullptr; + } + return testGPSScrollView; + } +} + diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testPresenter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testPresenter.cpp index 27e512b82..9acd86b6b 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testPresenter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testPresenter.cpp @@ -16,6 +16,7 @@ #include "cywee_service.h" #include "factorytest_protocol.h" #include "custom_runtime.h" +#include "gnss_ctl.h" namespace OHOS { @@ -314,7 +315,25 @@ namespace OHOS testA5133View::GetInstance()->a5133_receive_callback(); } + + + + #endif + if (strcmp(view.GetViewId(), GPS_OPEN_CONFIRM_BUTTON) == 0) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GPS On OnClick"); + gnss_start(); + + } + + + if (strcmp(view.GetViewId(), GPS_CLOSE_CANCEL_BUTTON) == 0) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GPS On OnClick"); + gnss_stop(); + } + return false; } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testView.cpp index 5635c198d..6386552e7 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testView.cpp @@ -7,6 +7,7 @@ #include "cat1_ctl.h" #include "cat1_server_hal.h" #endif + #include "custom_utils.h" #include "custom_runtime.h" namespace OHOS @@ -24,8 +25,11 @@ namespace OHOS {LUMINANCE,"luminanceButton","luminance","luminanceButton_next", &testView::ChangLUMTESTView,true}, {CHAR,"chargingButton","bat&charger","chargingButton_next",&testView::ChangchargingTESTView,true}, {SPEAK,"speakButton","speak","speakButton_next" ,&testView::ChangspeakTESTView,true}, + {MOTOR,"motorButton","motor","motorButton_next" ,&testView::ChangmotorTESTView,true}, + #ifdef SUPPORT_CAT1_MODEM {CAT1,"cat1button","CAT1", "cat1button_next",&testView::ChangeCAT1TESTView,true}, + #endif {BUTTON,"buttonbutton","button" ,"buttonbutton_next",&testView::ChangKEYTESTView,true}, {MICROPHONE,"microphonebutton","microphone", "microphonebutton_next",&testView::ChangeMPTESTView,true}, {HRSENSON,"hrsensonbutton","hrsensor", "hrsensonbutton_next",&testView::ChangeHRTESTView,true}, @@ -33,6 +37,9 @@ namespace OHOS {BTTEST,"BTbutton","BT" ,"BTbutton_next",&testView::ChangeBTTESTView,true}, {SEChipTest,"SEChipTestbutton","SEChipTest","SEChipTestbutton_next" ,&testView::ChangeSEChipTESTView,true}, {PingTest,"PingTestbutton","PingTest","PingTestbutton_next" ,&testView::ChangePingTESTView,true}, + + {GPSTEST,"GPSTestbutton","GPSTest","GPSTestbutton_next" ,&testView::ChangeGPSTESTView,true}, + {OLDTEST,"oldtestbutton","aging" ,"oldtestexit",&testView::ChangeoldTESTView,true}, {DEEPSLEEP,"deepsleep","DeepSleepCurrent","xxxxxxxxx" ,&testView::ChangeoldTESTView,true}, {shutdown,"shutdown","shutdown", "xxxxxxxxx",&testView::ChangeoldTESTView,true}, @@ -41,13 +48,7 @@ namespace OHOS #ifdef SUPPORT_A5133_SERVICE {RF5133,"RF5133","RF5133", "xxxxxxxxx",&testView::ChangeA5133TESTView,true}, #endif - // {SYSTEMLUPGRADE,"systemupgread","系统升级",&testView::ChangeSystemAboutView}, - // {TEST,"testButton","测试模式", &testView::ChangeSystemAboutView}, - - // {ABOUTTHEWATCHVIEW, &SystemView::ChangeSystemAboutView}, - // {SUPERVISEVIEW, &SystemView::ChangeSystemSuperviseView}, - // {SYSTEMLANGUAGEVIEW, &SystemView::ChangeSystemLanguageView}, - // {FACTORYRESETVIEW, &SystemView::ChangeSystemFactoryResetView}, + }; testView::testView() @@ -73,13 +74,6 @@ namespace OHOS if (initViewStatus == true) { SystemScrollView[TESTVIEW]->RemoveAll(); - // UIView::OnDragListener *draglistener = SystemScrollView[SYSTEMVIEW]->GetOnDragListener(); - // if (draglistener != nullptr) - // { - // delete draglistener; - // draglistener = nullptr; - // } - int funcSize = sizeof(Test_ViewMapper_t) / sizeof(Test_ViewMapper_t[TESTVIEW]); for (int i = 0; i < funcSize; i++) { @@ -125,11 +119,14 @@ namespace OHOS delete test_motor_view;//7 test_motor_view = nullptr; } +#ifdef SUPPORT_CAT1_MODEM if(test_cat1_view) { delete test_cat1_view;//8 test_cat1_view = nullptr; } +#endif + if(test_KEY_view) { delete test_KEY_view;//9 @@ -194,6 +191,8 @@ namespace OHOS } SystemScrollView[TESTVIEW]->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight()); SystemScrollView[TESTVIEW]->SetStyle(STYLE_BACKGROUND_OPA, 0xff); +SystemScrollView[TESTVIEW]->SetStyle(STYLE_BORDER_RADIUS, 0); + SystemScrollView[TESTVIEW]->SetScrollBlankSize(35); SystemScrollView[TESTVIEW]->SetReboundSize(50); SystemScrollView[TESTVIEW]->SetDirection(1); @@ -614,6 +613,25 @@ namespace OHOS return true; } + + bool testView::ChangeGPSTESTView(int16_t thisView) + { + if (SystemScrollView[thisView] == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::ChangeSEChipTESTView"); + test_GPS_view = new testGPSView(); + if (test_GPS_view == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView:: new scrollView[%d] fail", thisView); + return false; + } + SystemScrollView[thisView] = test_GPS_view->testGPSInitIView((uint8_t)thisView); + RootView::GetInstance()->Add(SystemScrollView[thisView]); + } + return true; + } + + #ifdef SUPPORT_A5133_SERVICE bool testView::ChangeA5133TESTView(int16_t thisView) { @@ -729,12 +747,14 @@ namespace OHOS test_motor_view = nullptr; SystemScrollView[hideView]=nullptr; break; +#ifdef SUPPORT_CAT1_MODEM case CAT1: RootView::GetInstance()->Remove(SystemScrollView[hideView]); delete test_cat1_view; test_cat1_view = nullptr; SystemScrollView[hideView]=nullptr; break; +#endif case BUTTON: RootView::GetInstance()->Remove(SystemScrollView[hideView]); delete test_KEY_view; @@ -782,6 +802,12 @@ namespace OHOS delete test_Ping_view; test_Ping_view = nullptr; SystemScrollView[hideView]=nullptr; + break; + case GPSTEST: + RootView::GetInstance()->Remove(SystemScrollView[hideView]); + delete test_GPS_view; + test_GPS_view = nullptr; + SystemScrollView[hideView]=nullptr; break; #ifdef SUPPORT_A5133_SERVICE case RF5133: