mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Fixes HelloConnections that can't discover Pixel device from iPhone for Ble_v2 medium.
PiperOrigin-RevId: 517318035
This commit is contained in:
committed by
Copybara-Service
parent
debe65ce54
commit
94ff506d1e
@@ -198,7 +198,7 @@ class BleMedium : public api::ble_v2::BleMedium {
|
||||
private:
|
||||
GNCMBleCentral *central_;
|
||||
std::string peripheral_id_;
|
||||
absl::flat_hash_map<api::ble_v2::GattCharacteristic, absl::string_view>
|
||||
absl::flat_hash_map<api::ble_v2::GattCharacteristic, const std::string>
|
||||
gatt_characteristic_values_;
|
||||
};
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "internal/platform/implementation/apple/bluetooth_adapter.h"
|
||||
#include "internal/platform/implementation/apple/utils.h"
|
||||
@@ -574,7 +575,7 @@ absl::optional<std::string> BleMedium::GattClient::ReadCharacteristic(
|
||||
if (it == gatt_characteristic_values_.end()) {
|
||||
return absl::nullopt; // NOLINT
|
||||
}
|
||||
return std::string(it->second);
|
||||
return it->second;
|
||||
}
|
||||
|
||||
bool BleMedium::GattClient::WriteCharacteristic(
|
||||
|
||||
Reference in New Issue
Block a user