| Index: device/bluetooth/bluetooth_adapter_mac.mm
|
| diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
|
| index cda597deee6aa0aaa1df0e0acdce78eeeb35af77..4340c7e46ad6163741548a4474a7219c32fc0e95 100644
|
| --- a/device/bluetooth/bluetooth_adapter_mac.mm
|
| +++ b/device/bluetooth/bluetooth_adapter_mac.mm
|
| @@ -530,7 +530,9 @@ void BluetoothAdapterMac::LowEnergyDeviceUpdated(
|
| const bool is_new_device = device_mac == nullptr;
|
| if (is_new_device) {
|
| // A new device has been found.
|
| - device_mac = new BluetoothLowEnergyDeviceMac(this, peripheral);
|
| + bool connectable =
|
| + [advertisement_data[CBAdvertisementDataIsConnectable] boolValue];
|
| + device_mac = new BluetoothLowEnergyDeviceMac(this, peripheral, connectable);
|
| VLOG(1) << *device_mac << ": New Device.";
|
| } else if (DoesCollideWithKnownDevice(peripheral, device_mac)) {
|
| return;
|
| @@ -635,7 +637,7 @@ BluetoothAdapterMac::RetrieveGattConnectedDevicesWithService(
|
| continue;
|
| }
|
| if (is_new_device) {
|
| - device_mac = new BluetoothLowEnergyDeviceMac(this, peripheral);
|
| + device_mac = new BluetoothLowEnergyDeviceMac(this, peripheral, true);
|
| std::string device_address =
|
| BluetoothLowEnergyDeviceMac::GetPeripheralHashAddress(peripheral);
|
| devices_[device_address] = base::WrapUnique(device_mac);
|
|
|