mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1156503 - Update device name from |RemoteDevicePropertiesNotification| during discovery, r=shuang
This commit is contained in:
parent
218a604d12
commit
9924d3f585
@ -2482,8 +2482,9 @@ BluetoothServiceBluedroid::AdapterPropertiesNotification(
|
||||
* RemoteDevicePropertiesNotification will be called
|
||||
*
|
||||
* (1) automatically by Bluedroid when BT is turning on, or
|
||||
* (2) as result of GetRemoteDeviceProperties, or
|
||||
* (3) as result of GetRemoteServices.
|
||||
* (2) as result of remote device properties update during discovery, or
|
||||
* (3) as result of GetRemoteDeviceProperties, or
|
||||
* (4) as result of GetRemoteServices.
|
||||
*/
|
||||
void
|
||||
BluetoothServiceBluedroid::RemoteDevicePropertiesNotification(
|
||||
@ -2654,8 +2655,18 @@ BluetoothServiceBluedroid::RemoteDevicePropertiesNotification(
|
||||
BT_APPEND_NAMED_VALUE(props, "Connected", IsConnected(aBdAddr));
|
||||
|
||||
if (sRequestedDeviceCountArray.IsEmpty()) {
|
||||
// This is possible because the callback would be called after turning
|
||||
// Bluetooth on.
|
||||
/**
|
||||
* This is possible when
|
||||
*
|
||||
* (1) the callback is called after Bluetooth is turned on, or
|
||||
* (2) remote device properties get updated during discovery.
|
||||
*
|
||||
* For (2), fire 'devicefound' again to update device name.
|
||||
* See bug 1076553 for more information.
|
||||
*/
|
||||
DistributeSignal(BluetoothSignal(NS_LITERAL_STRING("DeviceFound"),
|
||||
NS_LITERAL_STRING(KEY_ADAPTER),
|
||||
BluetoothValue(props)));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user