From 628255ac59922ef4d3c0e8f9da620983a897dc2f Mon Sep 17 00:00:00 2001 From: jfcarroll Date: Thu, 12 Aug 2021 18:28:26 -0700 Subject: [PATCH] Cleanup Items that I didn't want or otherwise didn't get in the last c/l PiperOrigin-RevId: 390507261 --- cpp/platform/impl/windows/bluetooth_classic_device.h | 2 -- cpp/platform/impl/windows/bluetooth_classic_medium.cc | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cpp/platform/impl/windows/bluetooth_classic_device.h b/cpp/platform/impl/windows/bluetooth_classic_device.h index 2f3ffbae..78161533 100644 --- a/cpp/platform/impl/windows/bluetooth_classic_device.h +++ b/cpp/platform/impl/windows/bluetooth_classic_device.h @@ -59,11 +59,9 @@ class BluetoothDevice : public api::BluetoothDevice { BluetoothDevice& operator=(BluetoothDevice&&) = default; // https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#getName() - // TODO(b/184975123): replace with real implementation. std::string GetName() const override; // Returns BT MAC address assigned to this device. - // TODO(b/184975123): replace with real implementation. std::string GetMacAddress() const override; std::string GetId() { return id_; } diff --git a/cpp/platform/impl/windows/bluetooth_classic_medium.cc b/cpp/platform/impl/windows/bluetooth_classic_medium.cc index 61c2c398..7beca335 100644 --- a/cpp/platform/impl/windows/bluetooth_classic_medium.cc +++ b/cpp/platform/impl/windows/bluetooth_classic_medium.cc @@ -348,9 +348,9 @@ winrt::fire_and_forget BluetoothClassicMedium::DeviceWatcher_Updated( winrt::fire_and_forget BluetoothClassicMedium::DeviceWatcher_Removed( DeviceWatcher sender, DeviceInformationUpdate deviceInfo) { - if (IsWatcherStarted()) { - EnterCriticalSection(&critical_section_); + EnterCriticalSection(&critical_section_); + if (IsWatcherStarted()) { if (discovery_callback_.device_lost_cb != nullptr) { discovery_callback_.device_lost_cb(*devices_by_id_[deviceInfo.Id()]); }