No changes to public files

PiperOrigin-RevId: 392585608
This commit is contained in:
hai007
2021-08-23 21:55:15 -07:00
committed by Copybara-Service
parent c73504e68d
commit 3e40931286
34 changed files with 2643 additions and 52 deletions
@@ -26,7 +26,7 @@
namespace location {
namespace nearby {
namespace windows {
BluetoothServerSocket::BluetoothServerSocket() {
BluetoothServerSocket::BluetoothServerSocket() : rfcomm_provider_(nullptr) {
InitializeCriticalSection(&critical_section_);
}
@@ -61,8 +61,9 @@ std::unique_ptr<api::BluetoothSocket> BluetoothServerSocket::Accept() {
return nullptr;
}
Exception BluetoothServerSocket::StartListening(
const std::string& service_name, const std::string& service_uuid) {
Exception BluetoothServerSocket::StartListening(const std::string& service_name,
const std::string& service_uuid,
bool radioDiscoverable) {
EnterCriticalSection(&critical_section_);
winrt::guid service(service_uuid);
@@ -121,7 +122,7 @@ Exception BluetoothServerSocket::StartListening(
try {
rfcomm_provider_->StartAdvertising(
stream_socket_listener_.as<StreamSocketListener>(), true);
stream_socket_listener_.as<StreamSocketListener>(), radioDiscoverable);
} catch (std::exception exception) {
// We will log and eat the exception since the caller
// expects nullptr if it fails