This is the fix for StartDiscovery/Connect/Disconnect/StartDiscovery.

PiperOrigin-RevId: 424866263
This commit is contained in:
jfcarroll
2022-02-02 11:45:04 -08:00
committed by hai007
parent 5bc20e2ea4
commit 1e61c5fb23
3 changed files with 69 additions and 40 deletions
@@ -173,7 +173,8 @@ class BluetoothClassicMedium : public api::BluetoothClassicMedium {
// hstring is the only type of string winrt understands.
// https://docs.microsoft.com/en-us/uwp/cpp-ref-for-winrt/hstring
std::map<winrt::hstring, std::unique_ptr<BluetoothDevice>> devices_by_id_;
std::map<winrt::hstring, std::unique_ptr<BluetoothDevice>>
discovered_devices_by_id_;
// CRITICAL_SECTION is a lightweight synchronization mechanism
// https://docs.microsoft.com/en-us/windows/win32/sync/critical-section-objects