From 7be83c578c611cd28185333696c17b2560f30444 Mon Sep 17 00:00:00 2001 From: Andre Eisenbach Date: Thu, 3 Sep 2015 15:20:09 -0700 Subject: Bluetooth: Fix profile auto-connect logic The fix in commit 05e08c3a2f27d5027b34e81b7c0a67e4da7341f6 caused a duplicate connect message to be sent to A2DP devices (and others), causing the A2DP state machine to disconnect a device shortly after connecting it. This patch reverts the relevant part of commit 05e06c that causes the faulty auto-connect behaviour. Bug: 22128169 Change-Id: Ie0dadd5c9583bf2b64a8434a2a3603cb749b21d0 --- .../src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/SettingsLib') diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java index b0429ef..e4b1ed8 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java @@ -539,10 +539,10 @@ public final class CachedBluetoothDevice implements Comparable SystemClock.elapsedRealtime() - || (mConnectAttempted == 0))) { + && ((mConnectAttempted + timeout) > SystemClock.elapsedRealtime())) { connectWithoutResettingTimer(false); } + dispatchAttributesChanged(); } -- cgit v1.1