Bug 1252787 - Patch : Add HID profile when device is remote, r=shawnjohnjr

This commit is contained in:
Louis Chang 2016-03-07 15:05:49 +08:00
Родитель 3df9b47d3e
Коммит 4662cafd4a
1 изменённых файлов: 12 добавлений и 4 удалений

Просмотреть файл

@ -199,11 +199,19 @@ BluetoothProfileController::SetupProfiles(bool aAssignServiceClass)
}
// Rendering bit should be set if remote device supports A2DP.
// A device which supports AVRCP should claim that it's a peripheral and it's
// a remote control.
if (hasRendering || (isPeripheral && isRemoteControl)) {
if (hasRendering) {
AddProfile(BluetoothA2dpManager::Get());
AddProfile(BluetoothAvrcpManager::Get()); // register after A2DP
}
// A remote control may either support HID or AVRCP since class of device
// value are the same. So we can only differentiate between AVRCP and HID
// by using hasRendering bit.
if ((isPeripheral && isRemoteControl)) {
if (hasRendering) {
AddProfile(BluetoothAvrcpManager::Get());
} else {
AddProfile(BluetoothHidManager::Get());
}
}
// A device which supports HID should claim that it's a peripheral and it's