Index: device/bluetooth/bluez/bluetooth_device_bluez.cc |
diff --git a/device/bluetooth/bluez/bluetooth_device_bluez.cc b/device/bluetooth/bluez/bluetooth_device_bluez.cc |
index 417ed161d40b86266ffbb43cea208a835ae1a5ec..50f15ebd401bc3ff07019dadb5edb22be2c1983c 100644 |
--- a/device/bluetooth/bluez/bluetooth_device_bluez.cc |
+++ b/device/bluetooth/bluez/bluetooth_device_bluez.cc |
@@ -595,6 +595,20 @@ void BluetoothDeviceBlueZ::GetServiceRecords( |
weak_ptr_factory_.GetWeakPtr(), error_callback)); |
} |
+void BluetoothDeviceBlueZ::UpdateServiceData() { |
+ bluez::BluetoothDeviceClient::Properties* properties = |
+ bluez::BluezDBusManager::Get()->GetBluetoothDeviceClient()->GetProperties( |
+ object_path_); |
+ DCHECK(properties); |
+ DCHECK(properties->service_data.is_valid()); |
+ |
+ service_data_.clear(); |
+ for (const auto& pair : properties->service_data.value()) { |
+ service_data_.insert(std::pair<BluetoothUUID, std::vector<uint8_t>>( |
ortuno
2016/10/06 02:09:01
optional nit: You could do
service_data_[Bluetoot
puthik_chromium
2016/10/06 02:26:12
Done.
|
+ BluetoothUUID(pair.first), pair.second)); |
+ } |
+} |
+ |
BluetoothPairingBlueZ* BluetoothDeviceBlueZ::BeginPairing( |
BluetoothDevice::PairingDelegate* pairing_delegate) { |
pairing_.reset(new BluetoothPairingBlueZ(this, pairing_delegate)); |