[Unicast] Update the icons in LEA device settings

This is the step#2 at comment#4, showing the headphone icon or
the speaker icon by the Bluetooth Class.

Bug: 258009444
Test: build pass
Change-Id: Ic22bef443053b0975b20c6a6df8a80bb817ccf4e
This commit is contained in:
SongFerngWang
2022-12-23 03:20:29 +08:00
parent c307a592a2
commit 8b29095080

View File

@@ -275,7 +275,15 @@ public class LeAudioProfile implements LocalBluetoothProfile {
}
public int getDrawableResource(BluetoothClass btClass) {
return R.drawable.ic_bt_le_audio;
switch (btClass.getDeviceClass()) {
case BluetoothClass.Device.AUDIO_VIDEO_UNCATEGORIZED:
case BluetoothClass.Device.AUDIO_VIDEO_WEARABLE_HEADSET:
case BluetoothClass.Device.AUDIO_VIDEO_MICROPHONE:
case BluetoothClass.Device.AUDIO_VIDEO_HEADPHONES:
return R.drawable.ic_bt_le_audio;
default:
return R.drawable.ic_bt_le_audio_speakers;
}
}
public int getAudioLocation(BluetoothDevice device) {