Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2647)

Unified Diff: device/bluetooth/bluez/bluetooth_device_bluez.cc

Issue 2751223002: bluetooth: Stop support of reconnecting devices not supporting pairing (Closed)
Patch Set: fix an unittest failure Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/bluetooth/bluez/bluetooth_bluez_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluez/bluetooth_device_bluez.cc
diff --git a/device/bluetooth/bluez/bluetooth_device_bluez.cc b/device/bluetooth/bluez/bluetooth_device_bluez.cc
index 8e099686eeec7a45f806055c3c2b5f30e4962a84..2df2d4379d4b185dfec6c82d249c8659ff5c232e 100644
--- a/device/bluetooth/bluez/bluetooth_device_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_device_bluez.cc
@@ -333,10 +333,11 @@ bool BluetoothDeviceBlueZ::IsPaired() const {
object_path_);
DCHECK(properties);
- // Trusted devices are devices that don't support pairing but that the
- // user has explicitly connected; it makes no sense for UI purposes to
- // treat them differently from each other.
- return properties->paired.value() || properties->trusted.value();
+ // The Paired property reflects the successful pairing for BR/EDR/LE. The
+ // value of the Paired property is always false for the devices that don't
+ // support pairing. Once a device is paired successfully, both Paired and
+ // Trusted properties will be set to true.
+ return properties->paired.value();
}
bool BluetoothDeviceBlueZ::IsConnected() const {
@@ -449,7 +450,7 @@ void BluetoothDeviceBlueZ::Connect(
VLOG(1) << object_path_.value() << ": Connecting, " << num_connecting_calls_
<< " in progress";
- if (IsPaired() || !pairing_delegate || !IsPairable()) {
+ if (IsPaired() || !pairing_delegate) {
// No need to pair, or unable to, skip straight to connection.
ConnectInternal(false, callback, error_callback);
} else {
« no previous file with comments | « device/bluetooth/bluez/bluetooth_bluez_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698