From: hcj <1224667075@qq.com> Date: Sat, 27 Jul 2024 02:56:42 +0000 (+0800) Subject: 增加自动配对同意(未开启) X-Git-Tag: release_V1.2.70_20241020_135402~741^2~1 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F600%2Fhead;p=mirrors%2FFD230.git 增加自动配对同意(未开启) --- 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) {