From: luozheng <1732036298@qq.com> Date: Sat, 5 Oct 2024 05:20:48 +0000 (+0800) Subject: 修改音乐来源界面,蓝牙耳机连接状态错误显示 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=60f11fb2794ea2b16f9031c64089703f2b46d586;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 2f67c8d68..b08720589 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/player/src/MusicPlayerSourceView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/player/src/MusicPlayerSourceView.cpp @@ -512,15 +512,8 @@ namespace OHOS if (bluetoothHeadsetConnectState) { bool state = SettingModel::GetInstance().GetEarPhoneConnectStatus(); - List &bluetoothCaseList = BluetoothModel::GetInstance()->GetConnedDevicesCase(); - if (bluetoothCaseList.IsEmpty()) // 如果已连接设备列表为空,则显示未配对 - { - bluetoothHeadsetConnectState->SetTextId(STR_NOT_PAIRED); - } - else // 否则则显示连接状态 - { - bluetoothHeadsetConnectState->SetTextId(state ? STR_CONNECTED : STR_DISCONNECTED); - } + bluetoothHeadsetConnectState->SetTextId(state ? STR_CONNECTED : STR_DISCONNECTED); + bluetoothHeadsetConnectState->SetTextId(state ? STR_CONNECTED : STR_DISCONNECTED); bluetoothHeadsetConnectState->SetTextColor(state ? Color::GetColorFromRGBA(0x4f, 0xc3, 0x4c, 0xff) : Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x7f)); bluetoothHeadsetConnectState->Invalidate(); }