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; |