From 1532d16a6d11e7352d1759b608c49abf79c2bf8b Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Wed, 13 Aug 2025 17:38:35 +0800 Subject: [PATCH] =?utf8?q?=E9=81=A5=E6=8E=A7=E6=8B=8D=E7=85=A7=EF=BC=9A=20?= =?utf8?q?1.=E8=A7=A3=E5=86=B3=E9=81=A5=E6=8E=A7=E6=8B=8D=E7=85=A7?= =?utf8?q?=E7=95=8C=E9=9D=A2=E6=8C=89=E9=92=AE=E7=82=B9=E5=87=BB=E6=97=A0?= =?utf8?q?=E5=93=8D=E5=BA=94=E9=97=AE=E9=A2=98=202.=E8=A7=A3=E5=86=B3app?= =?utf8?q?=E4=B8=8B=E5=8F=91=E9=81=A5=E6=8E=A7=E6=8B=8D=E7=85=A7=E6=8C=87?= =?utf8?q?=E4=BB=A4=E6=89=8B=E8=A1=A8=E6=97=A0=E5=93=8D=E5=BA=94=E9=97=AE?= =?utf8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../takephotos/include/TakephotosPresenter.h | 3 --- .../takephotos/include/TakephotosView.h | 1 - .../takephotos/src/TakephotosPresenter.cpp | 17 ++--------------- .../nativeui/takephotos/src/TakephotosView.cpp | 16 +++------------- .../service/broadcast/src/broadcast_implement.c | 8 +++++++- .../services/ble_service/bleservice/bleEvent.c | 10 +--------- 6 files changed, 13 insertions(+), 42 deletions(-) diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/takephotos/include/TakephotosPresenter.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/takephotos/include/TakephotosPresenter.h index 0d4008383..bf22bf5ed 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/takephotos/include/TakephotosPresenter.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/takephotos/include/TakephotosPresenter.h @@ -20,9 +20,6 @@ namespace OHOS virtual ~TakephotosPresenter(); void OnStart() override; - void OnPause() override; - void OnResume() override; - void OnStop() override; static TakephotosPresenter *GetInstance(); private: diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/takephotos/include/TakephotosView.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/takephotos/include/TakephotosView.h index 5107e1dc5..1007a1e1f 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/takephotos/include/TakephotosView.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/takephotos/include/TakephotosView.h @@ -51,7 +51,6 @@ namespace OHOS static TakephotosView *GetInstance(void); void OnStart() override; - void OnStop() override; void InitView(); void DeInit(); void PreLoad(void); diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/takephotos/src/TakephotosPresenter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/takephotos/src/TakephotosPresenter.cpp index 06a7c0f5a..6494666db 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/takephotos/src/TakephotosPresenter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/takephotos/src/TakephotosPresenter.cpp @@ -37,6 +37,7 @@ namespace OHOS TakephotosPresenter::TakephotosPresenter() { + g_pTakephotosPresenter = this; #ifdef MEM_CHECK MemCheck::GetInstance()->EnableLeakCheck(true); #endif @@ -45,6 +46,7 @@ namespace OHOS TakephotosPresenter::~TakephotosPresenter() { g_pTakephotosPresenter = nullptr; + TakePhotosNum = 0; #ifdef MEM_CHECK MemCheck::GetInstance()->EnableLeakCheck(false); #endif @@ -59,21 +61,6 @@ namespace OHOS { } - void TakephotosPresenter::OnPause(void) - { - Presenter::OnPause(); - } - - void TakephotosPresenter::OnResume(void) - { - Presenter::OnResume(); - } - - void TakephotosPresenter::OnStop(void) - { - TakePhotosNum = 0; - } - bool TakephotosPresenter::OnDrag(UIView &view, const DragEvent &event) { if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT && diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/takephotos/src/TakephotosView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/takephotos/src/TakephotosView.cpp index cf1586ce9..e46f0d4c2 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/takephotos/src/TakephotosView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/takephotos/src/TakephotosView.cpp @@ -111,10 +111,11 @@ namespace OHOS /* DeInit:删除组件 */ void TakephotosView::DeInit() { - - if (scrollview_) + if (scrollview_ != nullptr) { scrollview_->RemoveAll(); + delete scrollview_; + scrollview_ = nullptr; } if (creamView) { @@ -355,15 +356,4 @@ namespace OHOS labelclick_->Invalidate(); } } - - void TakephotosView::OnStop() - { - if (scrollview_ != nullptr) - { - scrollview_->RemoveAll(); - delete scrollview_; - scrollview_ = nullptr; - } - return; - } } // namespace OHOS diff --git a/code/sdk/application/wearable/fd230/service/broadcast/src/broadcast_implement.c b/code/sdk/application/wearable/fd230/service/broadcast/src/broadcast_implement.c index ad29282c3..c3b661a34 100644 --- a/code/sdk/application/wearable/fd230/service/broadcast/src/broadcast_implement.c +++ b/code/sdk/application/wearable/fd230/service/broadcast/src/broadcast_implement.c @@ -43,11 +43,17 @@ static const TopicToCore topicToCoreArray[] = { {TOPIC_EVENT_LOWPOWER_ALARM, A_CORE_MASK, 1}, {TOPIC_EVENT_AR_ALERT_TYPE_UPDATE, A_CORE_MASK, 1}, {TOPIC_EVENT_INACTIVITY_UPDATE, A_CORE_MASK, 1}, - {TOPIC_EVENT_FIND_WATCH, A_CORE_MASK, 1}, + {TOPIC_EVENT_FIND_WATCH, A_CORE_MASK, 1}, //查找手表 {TOPIC_EVENT_DEBUGOUTPUT, A_CORE_MASK, 1}, {TOPIC_EVENT_GOAL_SHOW_VIEW, A_CORE_MASK, 1}, {TOPIC_EVENT_DRINKREMINDER, A_CORE_MASK, 1}, {TOPIC_EVENT_SLEEPNOTE, A_CORE_MASK, 1}, + {TOPIC_EVENT_ENTER_CMAERA,A_CORE_MASK, 1}, //遥控拍照 + {TOPIC_EVENT_CANCEL_CMAERA,A_CORE_MASK, 1}, //取消遥控拍照 + {TOPIC_EVENT_ASSISTANT_NOTE,A_CORE_MASK, 1}, //语音助手 + {TOPIC_EVENT_MESSAGENOTE,A_CORE_MASK, 1}, + {TOPIC_EVENT_MESSAGE_UPDATA,A_CORE_MASK, 1}, + {TOPIC_EVENT_SHUTDOWN_ANIMATIOR,A_CORE_MASK, 1}, }; /* 所有的topic,其对应的位图 */ diff --git a/code/sdk/zhihui/services/ble_service/bleservice/bleEvent.c b/code/sdk/zhihui/services/ble_service/bleservice/bleEvent.c index a36f36205..103de4506 100644 --- a/code/sdk/zhihui/services/ble_service/bleservice/bleEvent.c +++ b/code/sdk/zhihui/services/ble_service/bleservice/bleEvent.c @@ -4063,15 +4063,7 @@ static void findWatchCmd(uint16_t cmd,uint8_t *data,uint16_t len,uint8_t *totald if(Check_CRC(data,len,crcvalue)) { uint8_t findFlag = data[0]; - //弹窗界面 - if(findFlag)//查找手表弹窗界面 - // { - // CustomEventPublish(TOPIC_EVENT_FIND_WATCH,&findFlag,sizeof(findFlag)); - // }else//停止查找手表 如果在查找手表界面就要停止回到上一级界面 - // { - // CustomEventPublish(TOPIC_EVENT_CANCEL_FIND_WATCH,NULL,0); - // } - CustomEventPublish(TOPIC_EVENT_FIND_WATCH,&findFlag,sizeof(findFlag)); + CustomEventPublish(TOPIC_EVENT_FIND_WATCH,&findFlag,sizeof(findFlag));//查找手表 setFindWatchFlag(1); }else { -- 2.17.1