mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Set scan mode was starting advertising whether we should or not.
SetScanMode now only starts advertising if the radio is discoverable. PiperOrigin-RevId: 452461975
This commit is contained in:
committed by
Copybara-Service
parent
09c04d4cc8
commit
8f067bba98
@@ -96,7 +96,9 @@ class BluetoothServerSocket : public api::BluetoothServerSocket {
|
||||
void SetScanMode(bool radioDiscoverable) {
|
||||
StopAdvertising();
|
||||
radio_discoverable_ = radioDiscoverable;
|
||||
StartAdvertising();
|
||||
if (radio_discoverable_) {
|
||||
StartAdvertising();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user