From faf4a9bd4452a589302165704cbbc69591112ed4 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Sat, 27 Jul 2024 10:56:42 +0800 Subject: [PATCH] =?utf8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8=E9=85=8D?= =?utf8?q?=E5=AF=B9=E5=90=8C=E6=84=8F=EF=BC=88=E6=9C=AA=E5=BC=80=E5=90=AF?= =?utf8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../msg_center/include/notify/pairing_notification.h | 7 ++++++- .../service/msg_center/src/notify/pairing_notification.cpp | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/code/sdk/application/wearable/service/msg_center/include/notify/pairing_notification.h b/code/sdk/application/wearable/service/msg_center/include/notify/pairing_notification.h index df9c58b4f..1edfdc305 100644 --- a/code/sdk/application/wearable/service/msg_center/include/notify/pairing_notification.h +++ b/code/sdk/application/wearable/service/msg_center/include/notify/pairing_notification.h @@ -9,7 +9,7 @@ #define PAIRING_NOTIFICATION_H #include "BaseView.h" - +#define NO_LCD_TEST_CONNECT 0 namespace OHOS { UIViewGroup *CreateDeviceBindingView(void); @@ -28,7 +28,12 @@ namespace OHOS bool OnClick(OHOS::UIView &view, const OHOS::ClickEvent &event) override; void SetDeviceName(char *Name); char *GetDeviceName(); + #if NO_LCD_TEST_CONNECT + void Pairing_StartTimer(uint32_t interval = 1000*5); + #else void Pairing_StartTimer(uint32_t interval = 1000*30); + #endif + void Pairing_StopTimer(void); char DeviceName[50]; private: diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp index fc12b63b4..c914cecb0 100644 --- a/code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp @@ -307,6 +307,9 @@ namespace OHOS DeviceBindingView->Add(DeviceBindingViewLabel); DeviceBindingView->Add(DeviceBindingButtonCancel); DeviceBindingView->Add(DeviceBindingButtonOK); + #if NO_LCD_TEST_CONNECT + PairingViewEventListener::GetInstance().Pairing_StartTimer(); + #endif } return DeviceBindingView; } @@ -698,8 +701,12 @@ namespace OHOS { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Pairing_TimerCallbackProc"); #ifdef SUPPORT_BLE_SERVICE + #if NO_LCD_TEST_CONNECT + comfirmPaire(1); + #else comfirmPaire(0); #endif + #endif if( NotificationManager::GetInstance()->GetShowingNotifyId() == TOPIC_EVENT_DEVICE_BIND && NotificationManager::GetInstance()->HasNotifyShowing() == true) { -- 2.17.1