mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
Fixes bluetooth_medium is not supported then don't continue for BleDiscoveredHandler.
PiperOrigin-RevId: 391418495
This commit is contained in:
committed by
Copybara-Service
parent
913a639a5d
commit
56b7daf88d
@@ -407,11 +407,21 @@ BluetoothSocket BluetoothClassic::AttemptToConnect(
|
||||
BluetoothDevice BluetoothClassic::GetRemoteDevice(
|
||||
const std::string& mac_address) {
|
||||
MutexLock lock(&mutex_);
|
||||
|
||||
if (!IsAvailableLocked()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return medium_.GetRemoteDevice(mac_address);
|
||||
}
|
||||
|
||||
std::string BluetoothClassic::GetMacAddress() const {
|
||||
MutexLock lock(&mutex_);
|
||||
|
||||
if (!IsAvailableLocked()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return medium_.GetMacAddress();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user