Commit 4943b1d1 authored by Qiyu Hu's avatar Qiyu Hu Committed by Commit Bot

arc: bluetooth: Remove Get/SetRemote.*

A relevant patch is ag/5473995.

Bug: b:111367421
Test: build
Change-Id: Icdf9cf1dcd6b391ef4190c4fac89c00ef3fddb54
Reviewed-on: https://chromium-review.googlesource.com/c/1327332Reviewed-by: default avatarYusuke Sato <yusukes@chromium.org>
Reviewed-by: default avatarHidehiko Abe <hidehiko@chromium.org>
Reviewed-by: default avatarGreg Kerr <kerrnel@chromium.org>
Commit-Queue: Qiyu Hu <qiyuh@google.com>
Cr-Commit-Position: refs/heads/master@{#606935}
parent 09324182
...@@ -1060,58 +1060,6 @@ void ArcBluetoothBridge::SetAdapterProperty( ...@@ -1060,58 +1060,6 @@ void ArcBluetoothBridge::SetAdapterProperty(
} }
} }
void ArcBluetoothBridge::GetRemoteDeviceProperty(
mojom::BluetoothAddressPtr remote_addr,
mojom::BluetoothPropertyType type) {
DCHECK(bluetooth_adapter_);
auto* bluetooth_instance = ARC_GET_INSTANCE_FOR_METHOD(
arc_bridge_service_->bluetooth(), OnRemoteDeviceProperties);
if (!bluetooth_instance)
return;
std::string addr_str = remote_addr->To<std::string>();
BluetoothDevice* device = bluetooth_adapter_->GetDevice(addr_str);
std::vector<mojom::BluetoothPropertyPtr> properties =
GetDeviceProperties(type, device);
mojom::BluetoothStatus status = mojom::BluetoothStatus::SUCCESS;
if (!device) {
VLOG(1) << __func__ << ": device " << addr_str << " not available";
status = mojom::BluetoothStatus::FAIL;
}
bluetooth_instance->OnRemoteDeviceProperties(status, std::move(remote_addr),
std::move(properties));
}
void ArcBluetoothBridge::SetRemoteDeviceProperty(
mojom::BluetoothAddressPtr remote_addr,
mojom::BluetoothPropertyPtr property) {
DCHECK(bluetooth_adapter_);
auto* bluetooth_instance = ARC_GET_INSTANCE_FOR_METHOD(
arc_bridge_service_->bluetooth(), OnRemoteDeviceProperties);
if (!bluetooth_instance)
return;
// Unsupported. Only used by Android hidden API, BluetoothDevice.SetAlias().
// And only Android Settings App / Android TV / NFC used that.
bluetooth_instance->OnRemoteDeviceProperties(
mojom::BluetoothStatus::UNSUPPORTED, std::move(remote_addr),
std::vector<mojom::BluetoothPropertyPtr>());
}
void ArcBluetoothBridge::GetRemoteServiceRecord(
mojom::BluetoothAddressPtr remote_addr,
const BluetoothUUID& uuid) {
// TODO(smbarber): Implement GetRemoteServiceRecord
}
void ArcBluetoothBridge::GetRemoteServices(
mojom::BluetoothAddressPtr remote_addr) {
// TODO(smbarber): Implement GetRemoteServices
}
void ArcBluetoothBridge::StartDiscovery() { void ArcBluetoothBridge::StartDiscovery() {
discovery_queue_.Push(base::BindOnce(&ArcBluetoothBridge::StartDiscoveryImpl, discovery_queue_.Push(base::BindOnce(&ArcBluetoothBridge::StartDiscoveryImpl,
weak_factory_.GetWeakPtr(), false)); weak_factory_.GetWeakPtr(), false));
......
...@@ -197,15 +197,6 @@ class ArcBluetoothBridge ...@@ -197,15 +197,6 @@ class ArcBluetoothBridge
void GetAdapterProperty(mojom::BluetoothPropertyType type) override; void GetAdapterProperty(mojom::BluetoothPropertyType type) override;
void SetAdapterProperty(mojom::BluetoothPropertyPtr property) override; void SetAdapterProperty(mojom::BluetoothPropertyPtr property) override;
void GetRemoteDeviceProperty(mojom::BluetoothAddressPtr remote_addr,
mojom::BluetoothPropertyType type) override;
void SetRemoteDeviceProperty(mojom::BluetoothAddressPtr remote_addr,
mojom::BluetoothPropertyPtr property) override;
void GetRemoteServiceRecord(mojom::BluetoothAddressPtr remote_addr,
const device::BluetoothUUID& uuid) override;
void GetRemoteServices(mojom::BluetoothAddressPtr remote_addr) override;
void StartDiscovery() override; void StartDiscovery() override;
void CancelDiscovery() override; void CancelDiscovery() override;
......
...@@ -293,19 +293,12 @@ struct BluetoothCreateSdpRecordResult { ...@@ -293,19 +293,12 @@ struct BluetoothCreateSdpRecordResult {
}; };
// Next Method ID: 45 // Next Method ID: 45
// Deprecated method ID: 20, 21 // Deprecated Method ID: 4, 5, 6, 7, 20, 21
interface BluetoothHost { interface BluetoothHost {
EnableAdapter@0() => (BluetoothAdapterState state); EnableAdapter@0() => (BluetoothAdapterState state);
DisableAdapter@1() => (BluetoothAdapterState state); DisableAdapter@1() => (BluetoothAdapterState state);
GetAdapterProperty@2(BluetoothPropertyType type); GetAdapterProperty@2(BluetoothPropertyType type);
SetAdapterProperty@3(BluetoothProperty property); SetAdapterProperty@3(BluetoothProperty property);
GetRemoteDeviceProperty@4(BluetoothAddress remote_addr,
BluetoothPropertyType type);
SetRemoteDeviceProperty@5(BluetoothAddress remote_addr,
BluetoothProperty property);
GetRemoteServiceRecord@6(BluetoothAddress remote_addr,
BluetoothUUID uuid);
GetRemoteServices@7(BluetoothAddress remote_addr);
StartDiscovery@8(); StartDiscovery@8();
CancelDiscovery@9(); CancelDiscovery@9();
CreateBond@10(BluetoothAddress addr, int32 transport); CreateBond@10(BluetoothAddress addr, int32 transport);
...@@ -409,6 +402,7 @@ interface BluetoothHost { ...@@ -409,6 +402,7 @@ interface BluetoothHost {
}; };
// Next Method ID: 21 // Next Method ID: 21
// Deprecated Method ID: 2
interface BluetoothInstance { interface BluetoothInstance {
// DEPRECATED: Please use Init@18 instead. // DEPRECATED: Please use Init@18 instead.
InitDeprecated@0(BluetoothHost host_ptr); InitDeprecated@0(BluetoothHost host_ptr);
...@@ -418,9 +412,6 @@ interface BluetoothInstance { ...@@ -418,9 +412,6 @@ interface BluetoothInstance {
OnAdapterProperties@1(BluetoothStatus status, OnAdapterProperties@1(BluetoothStatus status,
array<BluetoothProperty> properties); array<BluetoothProperty> properties);
OnRemoteDeviceProperties@2(BluetoothStatus status,
BluetoothAddress address,
array<BluetoothProperty> properties);
OnDeviceFound@3(array<BluetoothProperty> properties); OnDeviceFound@3(array<BluetoothProperty> properties);
OnDiscoveryStateChanged@4(BluetoothDiscoveryState state); OnDiscoveryStateChanged@4(BluetoothDiscoveryState state);
OnBondStateChanged@5(BluetoothStatus status, OnBondStateChanged@5(BluetoothStatus status,
......
...@@ -42,11 +42,6 @@ void FakeBluetoothInstance::OnAdapterProperties( ...@@ -42,11 +42,6 @@ void FakeBluetoothInstance::OnAdapterProperties(
mojom::BluetoothStatus status, mojom::BluetoothStatus status,
std::vector<mojom::BluetoothPropertyPtr> properties) {} std::vector<mojom::BluetoothPropertyPtr> properties) {}
void FakeBluetoothInstance::OnRemoteDeviceProperties(
mojom::BluetoothStatus status,
mojom::BluetoothAddressPtr address,
std::vector<mojom::BluetoothPropertyPtr> properties) {}
void FakeBluetoothInstance::OnDeviceFound( void FakeBluetoothInstance::OnDeviceFound(
std::vector<mojom::BluetoothPropertyPtr> properties) { std::vector<mojom::BluetoothPropertyPtr> properties) {
device_found_data_.push_back(std::move(properties)); device_found_data_.push_back(std::move(properties));
......
...@@ -74,10 +74,6 @@ class FakeBluetoothInstance : public mojom::BluetoothInstance { ...@@ -74,10 +74,6 @@ class FakeBluetoothInstance : public mojom::BluetoothInstance {
void OnAdapterProperties( void OnAdapterProperties(
mojom::BluetoothStatus status, mojom::BluetoothStatus status,
std::vector<mojom::BluetoothPropertyPtr> properties) override; std::vector<mojom::BluetoothPropertyPtr> properties) override;
void OnRemoteDeviceProperties(
mojom::BluetoothStatus status,
mojom::BluetoothAddressPtr address,
std::vector<mojom::BluetoothPropertyPtr> properties) override;
void OnDeviceFound( void OnDeviceFound(
std::vector<mojom::BluetoothPropertyPtr> properties) override; std::vector<mojom::BluetoothPropertyPtr> properties) override;
void OnDiscoveryStateChanged(mojom::BluetoothDiscoveryState state) override; void OnDiscoveryStateChanged(mojom::BluetoothDiscoveryState state) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment