Chromium Code Reviews| Index: device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc |
| diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc |
| index bb7e6696e7e55bfd7a930321243befbdd1541970..b4ecc88e6c62e2301e9561722615de9b17562b11 100644 |
| --- a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc |
| +++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc |
| @@ -155,10 +155,10 @@ void BluetoothRemoteGattCharacteristicAndroid::StartNotifySession( |
| return; |
| } |
| - BluetoothGattDescriptor* descriptor = GetDescriptorForUUID( |
| + std::vector<BluetoothGattDescriptor*> ccc_descriptor = GetDescriptorsForUUID( |
| BluetoothGattDescriptor::ClientCharacteristicConfigurationUuid()); |
| - if (!descriptor) { |
| + if (ccc_descriptor.size() != 1u) { |
|
ortuno
2016/03/13 20:41:45
Hmm this would fail with GATT NOT SUPPORTED if the
scheib
2016/03/25 00:13:57
Done: Different errors returned for <1 and >1. Tes
|
| LOG(ERROR) |
| << "Could not find client characteristic configuration descriptor"; |
| base::MessageLoop::current()->PostTask( |
| @@ -183,7 +183,7 @@ void BluetoothRemoteGattCharacteristicAndroid::StartNotifySession( |
| value.push_back(0); |
| pending_start_notify_calls_.push(std::make_pair(callback, error_callback)); |
| - descriptor->WriteRemoteDescriptor( |
| + ccc_descriptor[0]->WriteRemoteDescriptor( |
| value, base::Bind(&BluetoothRemoteGattCharacteristicAndroid:: |
| OnStartNotifySessionSuccess, |
| base::Unretained(this)), |