No-op the disconnect method in the BLE GATT client

PiperOrigin-RevId: 696171997
This commit is contained in:
Nick Bourdakos
2024-11-13 09:54:23 -08:00
committed by Copybara-Service
parent bdb220fcfd
commit 01a4c7967e
2 changed files with 4 additions and 3 deletions
@@ -128,7 +128,10 @@ bool GattClient::SetCharacteristicSubscription(
}
void GattClient::Disconnect() {
[gatt_client_ disconnect];
// There seems to be an issue between some iOS<>Android device pairs where the Android device will
// not connect to the iOS device if the iOS device disconnects and then attempts to reconnect.
// Because of this, we no-op here instead of calling `[gatt_client_ disconnect]`.
// See: b/375176623
}
} // namespace apple
@@ -119,8 +119,6 @@ bool BleMedium::StopAdvertising() {
void BleMedium::HandleAdvertisementFound(id<GNCPeripheral> peripheral,
NSDictionary<CBUUID *, NSData *> *serviceData) {
absl::MutexLock lock(&peripherals_mutex_);
[socketCentralManager_ retrievePeripheralWithIdentifier:peripheral.identifier
advertisementData:@{}];
api::ble_v2::BleAdvertisementData data;
for (CBUUID *key in serviceData.allKeys) {