Bug 993275 - [Bluedroid] Ensure icon for audio service devices, r=echou

This commit is contained in:
Ben Tian 2014-04-14 09:50:47 +08:00
parent 75a85f45ce
commit 145b3964a3

View File

@ -205,7 +205,22 @@ ClassToIcon(uint32_t aClass, nsAString& aRetIcon)
}
break;
}
if (aRetIcon.IsEmpty()) {
if (HAS_AUDIO(aClass)) {
/**
* Property 'Icon' may be missed due to CoD of major class is TOY(0x08).
* But we need to assign Icon as audio-card if service class is 'Audio'.
* This is for PTS test case TC_AG_COD_BV_02_I. As HFP specification
* defines that service class is 'Audio' can be considered as HFP HF.
*/
aRetIcon.AssignLiteral("audio-card");
} else {
BT_LOGR("No icon to match class: %x", aClass);
}
}
}
static ControlPlayStatus
PlayStatusStringToControlPlayStatus(const nsAString& aPlayStatus)
{