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

Unified Diff: device/bluetooth/bluetooth_adapter_bluez.cc

Issue 1606523002: Tidy up service discovery state for bluez on disconnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address issues highlighted in code review Created 4 years, 11 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 | « no previous file | device/bluetooth/bluetooth_gatt_bluez_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_bluez.cc
diff --git a/device/bluetooth/bluetooth_adapter_bluez.cc b/device/bluetooth/bluetooth_adapter_bluez.cc
index 4b50cd72f86bcea6ba5dcb6339bb74417af5840b..2f55fa2d9f17d7bfd2973d9a7a8e09ed4c1d9c46 100644
--- a/device/bluetooth/bluetooth_adapter_bluez.cc
+++ b/device/bluetooth/bluetooth_adapter_bluez.cc
@@ -493,9 +493,12 @@ void BluetoothAdapterBlueZ::DevicePropertyChanged(
// PlayStation joystick tries to reconnect after disconnection from USB.
// If it is still not trusted, set it, so it becomes available on the
// list of known devices.
- if (properties->connected.value() && device_bluez->IsTrustable() &&
- !properties->trusted.value())
- device_bluez->SetTrusted();
+ if (properties->connected.value()) {
+ if (device_bluez->IsTrustable() && !properties->trusted.value())
+ device_bluez->SetTrusted();
+ } else {
+ device_bluez->SetGattServicesDiscoveryComplete(false);
+ }
int count = 0;
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_gatt_bluez_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698