| Index: device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc
|
| diff --git a/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc b/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc
|
| index 81aaa3d0eae14ef81e7d0cafa4f4231d0e9f45c9..4f88edfa74a60006653d1c016cb8a64cd39961b3 100644
|
| --- a/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc
|
| +++ b/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc
|
| @@ -250,4 +250,27 @@ void BluetoothRemoteGattServiceChromeOS::GattCharacteristicRemoved(
|
| delete characteristic;
|
| }
|
|
|
| +void BluetoothRemoteGattServiceChromeOS::GattCharacteristicPropertyChanged(
|
| + const dbus::ObjectPath& object_path,
|
| + const std::string& property_name) {
|
| + if (characteristics_.find(object_path) == characteristics_.end()) {
|
| + VLOG(2) << "Properties of unknown characteristic changed";
|
| + return;
|
| + }
|
| +
|
| + // We may receive a property changed event in certain cases, e.g. when the
|
| + // characteristic "Flags" property has been updated with values from the
|
| + // "Characteristic Extended Properties" descriptor. In this case, kick off
|
| + // a service changed observer event to let observers refresh the
|
| + // characteristics.
|
| + BluetoothGattCharacteristicClient::Properties* properties =
|
| + DBusThreadManager::Get()->GetBluetoothGattCharacteristicClient()->
|
| + GetProperties(object_path);
|
| + DCHECK(properties);
|
| + if (property_name != properties->flags.name())
|
| + return;
|
| +
|
| + NotifyServiceChanged();
|
| +}
|
| +
|
| } // namespace chromeos
|
|
|