| Index: device/bluetooth/bluetooth_adapter_bluez.cc
|
| diff --git a/device/bluetooth/bluetooth_adapter_bluez.cc b/device/bluetooth/bluetooth_adapter_bluez.cc
|
| index 4424b0229d667befdb432cfc2b17dc4dd88d3040..2a8232cdd4d1e7881d4196312177d42199306f3c 100644
|
| --- a/device/bluetooth/bluetooth_adapter_bluez.cc
|
| +++ b/device/bluetooth/bluetooth_adapter_bluez.cc
|
| @@ -153,6 +153,7 @@ BluetoothAdapterBlueZ::BluetoothAdapterBlueZ(const InitCallback& init_callback)
|
| : init_callback_(init_callback),
|
| initialized_(false),
|
| dbus_is_shutdown_(false),
|
| + is_disabled_(false),
|
| num_discovery_sessions_(0),
|
| discovery_request_pending_(false),
|
| weak_ptr_factory_(this) {
|
| @@ -254,7 +255,15 @@ bool BluetoothAdapterBlueZ::IsInitialized() const {
|
| }
|
|
|
| bool BluetoothAdapterBlueZ::IsPresent() const {
|
| - return !dbus_is_shutdown_ && !object_path_.value().empty();
|
| + return !is_disabled_ && !dbus_is_shutdown_ && !object_path_.value().empty();
|
| +}
|
| +
|
| +void BluetoothAdapterBlueZ::SetDisabled(bool disabled) {
|
| + if (disabled) {
|
| + SetPowered(false, base::Bind(&base::DoNothing),
|
| + base::Bind(&base::DoNothing));
|
| + }
|
| + is_disabled_ = disabled;
|
| }
|
|
|
| bool BluetoothAdapterBlueZ::IsPowered() const {
|
|
|