| Index: device/bluetooth/bluetooth_remote_gatt_service_mac.mm
|
| diff --git a/device/bluetooth/bluetooth_remote_gatt_service_mac.mm b/device/bluetooth/bluetooth_remote_gatt_service_mac.mm
|
| index ca8ac7e06ef7da5c5d4413b28f648e4b8f48f244..505321e6aa15a60eb11cd9cf1f988f6c3a5d2d3d 100644
|
| --- a/device/bluetooth/bluetooth_remote_gatt_service_mac.mm
|
| +++ b/device/bluetooth/bluetooth_remote_gatt_service_mac.mm
|
| @@ -95,6 +95,7 @@ void BluetoothRemoteGattServiceMac::DidDiscoverCharacteristics() {
|
| if (gatt_characteristic_mac) {
|
| const std::string& identifier = gatt_characteristic_mac->GetIdentifier();
|
| characteristic_identifier_to_remove.erase(identifier);
|
| + gatt_characteristic_mac->DiscoverDescriptors();
|
| continue;
|
| }
|
| gatt_characteristic_mac =
|
| @@ -103,6 +104,7 @@ void BluetoothRemoteGattServiceMac::DidDiscoverCharacteristics() {
|
| auto result_iter = gatt_characteristic_macs_.insert(
|
| {identifier, base::WrapUnique(gatt_characteristic_mac)});
|
| DCHECK(result_iter.second);
|
| + gatt_characteristic_mac->DiscoverDescriptors();
|
| GetMacAdapter()->NotifyGattCharacteristicAdded(gatt_characteristic_mac);
|
| }
|
|
|
| @@ -118,6 +120,16 @@ void BluetoothRemoteGattServiceMac::DidDiscoverCharacteristics() {
|
| SendNotificationIfComplete();
|
| }
|
|
|
| +void BluetoothRemoteGattServiceMac::DidDiscoverDescriptors(
|
| + CBCharacteristic* characteristic) {
|
| + DCHECK(!is_discovery_complete_);
|
| + BluetoothRemoteGattCharacteristicMac* gatt_characteristic =
|
| + GetBluetoothRemoteGattCharacteristicMac(characteristic);
|
| + DCHECK(gatt_characteristic);
|
| + gatt_characteristic->DidDiscoverDescriptors();
|
| + SendNotificationIfComplete();
|
| +}
|
| +
|
| void BluetoothRemoteGattServiceMac::SendNotificationIfComplete() {
|
| DCHECK(!is_discovery_complete_);
|
| // Notify when all characteristics have been fully discovered.
|
|
|