From: luozheng <1732036298@qq.com> Date: Sat, 5 Oct 2024 10:20:54 +0000 (+0800) Subject: 回退音乐来源界面代码修改 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=90e4371eb7bd834af7b73c4db1e0f9fe477178b3;p=mirrors%2FFD230.git 回退音乐来源界面代码修改 --- 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(); }