From: xue <2144439972@qq.com> Date: Wed, 7 Jan 2026 12:50:47 +0000 (+0800) Subject: 如果有配对设备则上报状态否则不上报 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=c7eaaa9ca37ff13bbe786252f3ec11e1c94ce561;p=mirrors%2FFD230.git 如果有配对设备则上报状态否则不上报 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp index 863bc3b89..9c27a1f00 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp @@ -1734,10 +1734,17 @@ extern "C" { uapi_start_all_websocket_servers(0); // 连接服务器 #endif - //异步上报耳机状态 - GraphicService::GetInstance()->PostGraphicEvent([]() { + //如果有配对设备则上报状态否则不上报 + int connedDevicesNum = 0; + bool ret = gap_get_paired_devices_num(&connedDevicesNum); + if(ret == true && connedDevicesNum > 0) + { + //异步上报耳机状态 + GraphicService::GetInstance()->PostGraphicEvent([]() { ln_bt_report_earphone_connection_status(); - }); + }); + } + #ifdef DO_VAD_AUTH //VAD认证