mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 870304: Fix misssing icon when getting paired/connected list, r=echou
This commit is contained in:
parent
35f8a21258
commit
743e52c6ec
@ -1945,6 +1945,27 @@ public:
|
||||
v.get_ArrayOfBluetoothNamedValue().AppendElement(
|
||||
BluetoothNamedValue(NS_LITERAL_STRING("Path"), objectPath)
|
||||
);
|
||||
const InfallibleTArray<BluetoothNamedValue>& deviceProperties =
|
||||
v.get_ArrayOfBluetoothNamedValue();
|
||||
uint32_t length = deviceProperties.Length();
|
||||
// It is possible that property Icon missed due to CoD of major
|
||||
// class is TOY but service class is "Audio", we need to assign
|
||||
// Icon as audio-card. This is for PTS test TC_AG_COD_BV_02_I.
|
||||
// As HFP specification defined that
|
||||
// service class is "Audio" can be considered as HFP AG.
|
||||
if (!ContainsIcon(deviceProperties)) {
|
||||
for (uint32_t p = 0; p < length; ++p) {
|
||||
if (deviceProperties[p].name().EqualsLiteral("Class")) {
|
||||
if (HasAudioService(deviceProperties[p].value().get_uint32_t())) {
|
||||
v.get_ArrayOfBluetoothNamedValue()
|
||||
.AppendElement(
|
||||
BluetoothNamedValue(NS_LITERAL_STRING("Icon"),
|
||||
NS_LITERAL_STRING("audio-card")));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mFilterFunc(v)) {
|
||||
values.get_ArrayOfBluetoothNamedValue().AppendElement(
|
||||
|
Loading…
Reference in New Issue
Block a user