From: luozheng <1732036298@qq.com> Date: Wed, 13 Aug 2025 09:38:35 +0000 (+0800) Subject: 遥控拍照: X-Git-Tag: leiniao_debug_1.0.0_20250922_020716~184 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F2070%2F2;p=mirrors%2FFD230.git 遥控拍照: 1.解决遥控拍照界面按钮点击无响应问题 2.解决app下发遥控拍照指令手表无响应问题 --- 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 {