增加自动配对同意(未开启) 600/1 600/head 601/target/1
authorhcj <1224667075@qq.com>
Sat, 27 Jul 2024 02:56:42 +0000 (10:56 +0800)
committerhcj <1224667075@qq.com>
Sat, 27 Jul 2024 02:56:42 +0000 (10:56 +0800)
code/sdk/application/wearable/service/msg_center/include/notify/pairing_notification.h
code/sdk/application/wearable/service/msg_center/src/notify/pairing_notification.cpp

index df9c58b..1edfdc3 100644 (file)
@@ -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:
index fc12b63..c914cec 100644 (file)
@@ -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)
         {