mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Remove deprecated methods.
PiperOrigin-RevId: 829640164
This commit is contained in:
committed by
Copybara-Service
parent
f58e9820d5
commit
48ddaf0a95
@@ -414,6 +414,7 @@ cc_test(
|
||||
":windows",
|
||||
"//internal/platform:base",
|
||||
"//internal/platform:logging",
|
||||
"//internal/platform:mac_address",
|
||||
"//internal/platform/implementation:comm",
|
||||
"//internal/platform/implementation:platform",
|
||||
"//internal/platform/implementation:types",
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "absl/synchronization/notification.h"
|
||||
#include "internal/platform/implementation/ble.h"
|
||||
#include "internal/platform/implementation/windows/bluetooth_adapter.h"
|
||||
#include "internal/platform/mac_address.h"
|
||||
#include "internal/platform/uuid.h"
|
||||
|
||||
namespace nearby {
|
||||
@@ -50,7 +51,7 @@ class MockBluetoothAdapter : public BluetoothAdapter {
|
||||
MOCK_METHOD(bool, SetName, (absl::string_view name), (override));
|
||||
MOCK_METHOD(bool, SetName, (absl::string_view name, bool persist),
|
||||
(override));
|
||||
MOCK_METHOD(std::string, GetMacAddress, (), (const, override));
|
||||
MOCK_METHOD(MacAddress, GetAddress, (), (const, override));
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -841,14 +841,6 @@ MacAddress BluetoothAdapter::GetAddress() const {
|
||||
return mac_address;
|
||||
}
|
||||
|
||||
std::string BluetoothAdapter::GetMacAddress() const {
|
||||
MacAddress address = GetAddress();
|
||||
if (!address.IsSet()) {
|
||||
return "";
|
||||
}
|
||||
return address.ToString();
|
||||
}
|
||||
|
||||
std::string BluetoothAdapter::GetNameFromRegistry(PHKEY hKey) const {
|
||||
DWORD local_name_size = 0;
|
||||
DWORD value_type;
|
||||
|
||||
@@ -83,8 +83,6 @@ class BluetoothAdapter : public api::BluetoothAdapter {
|
||||
bool SetName(absl::string_view name, bool persist) override;
|
||||
|
||||
// Returns BT MAC address assigned to this adapter.
|
||||
std::string GetMacAddress() const override;
|
||||
|
||||
MacAddress GetAddress() const override;
|
||||
|
||||
// Returns bluetooth device name from registry
|
||||
|
||||
@@ -144,9 +144,9 @@ TEST(BluetoothAdapter, DISABLED_SetName_Exceeded) {
|
||||
EXPECT_EQ(bluetooth_adapter.GetName(), original_bluetooth_device_name);
|
||||
}
|
||||
|
||||
TEST(BluetoothAdapter, DISABLED_GetMacAddress) {
|
||||
TEST(BluetoothAdapter, DISABLED_GetAddress) {
|
||||
BluetoothAdapter bluetooth_adapter;
|
||||
EXPECT_TRUE(!bluetooth_adapter.GetMacAddress().empty());
|
||||
EXPECT_TRUE(bluetooth_adapter.GetAddress().IsSet());
|
||||
}
|
||||
|
||||
TEST(BluetoothAdapter, DISABLED_SetOnScanModeChanged) {
|
||||
|
||||
@@ -72,10 +72,6 @@ BluetoothDevice::BluetoothDevice(
|
||||
}
|
||||
|
||||
// Returns BT MAC address assigned to this device.
|
||||
std::string BluetoothDevice::GetMacAddress() const {
|
||||
return mac_address_.ToString();
|
||||
}
|
||||
|
||||
MacAddress BluetoothDevice::GetAddress() const { return mac_address_; }
|
||||
|
||||
// Checks cache first, will check uncached if no result.
|
||||
|
||||
@@ -70,7 +70,6 @@ class BluetoothDevice : public api::BluetoothDevice {
|
||||
std::string GetName() const override { return name_; }
|
||||
|
||||
// Returns BT MAC address assigned to this device.
|
||||
std::string GetMacAddress() const override;
|
||||
MacAddress GetAddress() const override;
|
||||
|
||||
std::string GetId() { return id_; }
|
||||
|
||||
@@ -293,7 +293,7 @@ api::BluetoothDevice* BluetoothClassicMedium::GetRemoteDevice(
|
||||
std::unique_ptr<api::BluetoothPairing> BluetoothClassicMedium::CreatePairing(
|
||||
api::BluetoothDevice& remote_device) {
|
||||
VLOG(1) << __func__ << ": Start to createPairing with device: "
|
||||
<< remote_device.GetMacAddress();
|
||||
<< remote_device.GetAddress().ToString();
|
||||
try {
|
||||
winrt::Windows::Devices::Bluetooth::BluetoothDevice bluetooth_device =
|
||||
winrt::Windows::Devices::Bluetooth::BluetoothDevice::
|
||||
|
||||
Reference in New Issue
Block a user