From 110026c44db887f7e54f7f3866aba719e787b4b3 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Thu, 24 Oct 2024 18:26:57 +0800 Subject: [PATCH] =?utf8?q?=E8=93=9D=E7=89=99=E4=BF=AE=E6=94=B9=EF=BC=8C?= =?utf8?q?=E5=A2=9E=E5=BF=AB=E9=93=BE=E6=8E=A5=E5=8A=A8=E7=94=BB=E9=80=9F?= =?utf8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../classicbluetooth/src/BluetoothServiceOptionsView.cpp | 4 ++-- .../fd230app/nativeui/settings/src/SettingModel.cpp | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/classicbluetooth/src/BluetoothServiceOptionsView.cpp b/code/sdk/application/wearable/fd230app/nativeui/classicbluetooth/src/BluetoothServiceOptionsView.cpp index 89567c555..b1fbfccc5 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/classicbluetooth/src/BluetoothServiceOptionsView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/classicbluetooth/src/BluetoothServiceOptionsView.cpp @@ -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); diff --git a/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingModel.cpp index 6e09757e7..58362b4cd 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingModel.cpp @@ -11,6 +11,10 @@ #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()) { -- 2.17.1