mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Internal change
PiperOrigin-RevId: 364353126
This commit is contained in:
@@ -255,16 +255,14 @@ bool Ble::StartAcceptingConnections(const std::string& service_id,
|
||||
|
||||
if (IsAcceptingConnectionsLocked(service_id)) {
|
||||
NEARBY_LOGS(INFO)
|
||||
<< "Refusing to start accepting BLE connections for "
|
||||
<< service_id
|
||||
<< "Refusing to start accepting BLE connections for " << service_id
|
||||
<< " because another BLE peripheral socket is already in-progress.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!radio_.IsEnabled()) {
|
||||
NEARBY_LOGS(INFO) << "Can't start accepting BLE connections for "
|
||||
<< service_id
|
||||
<< " because Bluetooth isn't enabled.";
|
||||
<< service_id << " because Bluetooth isn't enabled.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -310,7 +308,6 @@ bool Ble::IsAcceptingConnectionsLocked(const std::string& service_id) {
|
||||
return accepting_connections_info_.Existed(service_id);
|
||||
}
|
||||
|
||||
// TODO(b/169303284): Handles Cancellation and registration.
|
||||
BleSocket Ble::Connect(BlePeripheral& peripheral, const std::string& service_id,
|
||||
CancellationFlag* cancellation_flag) {
|
||||
MutexLock lock(&mutex_);
|
||||
@@ -324,8 +321,8 @@ BleSocket Ble::Connect(BlePeripheral& peripheral, const std::string& service_id,
|
||||
}
|
||||
|
||||
if (!radio_.IsEnabled()) {
|
||||
NEARBY_LOGS(INFO) << "Can't create client BLE socket to "
|
||||
<< &peripheral << " because Bluetooth isn't enabled.";
|
||||
NEARBY_LOGS(INFO) << "Can't create client BLE socket to " << &peripheral
|
||||
<< " because Bluetooth isn't enabled.";
|
||||
return socket;
|
||||
}
|
||||
|
||||
|
||||
@@ -344,7 +344,6 @@ bool BluetoothClassic::StopAcceptingConnections(
|
||||
return true;
|
||||
}
|
||||
|
||||
// TODO(b/169303284): Handles Cancellation and registration.
|
||||
BluetoothSocket BluetoothClassic::Connect(BluetoothDevice& bluetooth_device,
|
||||
const std::string& service_name,
|
||||
CancellationFlag* cancellation_flag) {
|
||||
|
||||
@@ -222,7 +222,6 @@ bool WifiLan::IsAcceptingConnectionsLocked(const std::string& service_id) {
|
||||
return accepting_connections_info_.Existed(service_id);
|
||||
}
|
||||
|
||||
// TODO(b/169303284): Handles Cancellation and registration.
|
||||
WifiLanSocket WifiLan::Connect(WifiLanService& wifi_lan_service,
|
||||
const std::string& service_id,
|
||||
CancellationFlag* cancellation_flag) {
|
||||
|
||||
Reference in New Issue
Block a user