From 5c368c19fb2ae060b4670dbb199be65097acb4c2 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Sat, 5 Oct 2024 18:20:54 +0800 Subject: [PATCH] =?utf8?q?=E5=9B=9E=E9=80=80=E9=9F=B3=E4=B9=90=E6=9D=A5?= =?utf8?q?=E6=BA=90=E7=95=8C=E9=9D=A2=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/player/src/MusicPlayerSourceView.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/player/src/MusicPlayerSourceView.cpp b/code/sdk/application/wearable/fd230app/nativeui/player/src/MusicPlayerSourceView.cpp index 0b5957965..2f67c8d68 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/player/src/MusicPlayerSourceView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/player/src/MusicPlayerSourceView.cpp @@ -512,7 +512,15 @@ namespace OHOS if (bluetoothHeadsetConnectState) { bool state = SettingModel::GetInstance().GetEarPhoneConnectStatus(); - bluetoothHeadsetConnectState->SetTextId(state ? STR_CONNECTED : STR_DISCONNECTED); + List &bluetoothCaseList = BluetoothModel::GetInstance()->GetConnedDevicesCase(); + if (bluetoothCaseList.IsEmpty()) // 如果已连接设备列表为空,则显示未配对 + { + bluetoothHeadsetConnectState->SetTextId(STR_NOT_PAIRED); + } + else // 否则则显示连接状态 + { + bluetoothHeadsetConnectState->SetTextId(state ? STR_CONNECTED : STR_DISCONNECTED); + } bluetoothHeadsetConnectState->SetTextColor(state ? Color::GetColorFromRGBA(0x4f, 0xc3, 0x4c, 0xff) : Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x7f)); bluetoothHeadsetConnectState->Invalidate(); } -- 2.17.1