蓝牙修改,增快链接动画速度 1253/1 1253/head 1254/target/1
authorhcj <1224667075@qq.com>
Thu, 24 Oct 2024 10:26:57 +0000 (18:26 +0800)
committerhcj <1224667075@qq.com>
Thu, 24 Oct 2024 10:26:57 +0000 (18:26 +0800)
code/sdk/application/wearable/fd230app/nativeui/classicbluetooth/src/BluetoothServiceOptionsView.cpp
code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingModel.cpp

index 89567c5..b1fbfcc 100644 (file)
@@ -139,7 +139,7 @@ namespace OHOS
                 break;
             
         }
-        if(count_num==3 || connect_state)
+        if(count_num==9 || connect_state)
         {
             if( BluetoothServiceOptionsView::GetInstance())
             BluetoothServiceOptionsView::GetInstance()->show_connecting_view(false);
@@ -190,7 +190,7 @@ namespace OHOS
 
         }
         MG_TEST_timer = osTimerNew((osTimerFunc_t)connectTimerCallBack, osTimerPeriodic, NULL, NULL);
-        tick =1500;
+        tick =500;
         retTimer = osTimerStart(MG_TEST_timer, tick);
         if (retTimer != osOK && MG_TEST_timer != NULL) {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"StartCallTimer osTimerStart failed, ret = %lx!!", retTimer);
index 6e09757..58362b4 100644 (file)
 #include "classicbluetooth/include/BluetoothServiceOptionsView.h"
 #include "player/include/PlayersView.h"
 #include "player/include/PlayersModel.h"
+#include "PhoneService.h"
+#include "phoneservice/include/PhoneService.h"
+#include "BluetoothModel.h"
+
 extern "C" {
 
 #include "custom_runtime.h"
@@ -130,7 +134,10 @@ namespace OHOS
         btConnectStatus = status;
         if (PullUpDownView::GetInstance() != nullptr)
         {
-            PullUpDownView::GetInstance()->UpdateBlueToothStatus(status);
+            if(!uapi_a2dp_snk_get_device_connect_state()&& !uapi_hfp_connect_state())
+            PullUpDownView::GetInstance()->UpdateBlueToothStatus(false);
+            else
+            PullUpDownView::GetInstance()->UpdateBlueToothStatus(true);
         }
         if (BluetoothServiceOptionsView::GetInstance())
         {