summaryrefslogtreecommitdiffstats
path: root/packages/SettingsLib
diff options
context:
space:
mode:
authorAndre Eisenbach <eisenbach@google.com>2015-09-03 15:20:09 -0700
committerAndre Eisenbach <eisenbach@google.com>2015-09-03 15:20:09 -0700
commit7be83c578c611cd28185333696c17b2560f30444 (patch)
treed5a663589eea78f40cf9b5158c40440a93a57364 /packages/SettingsLib
parent7d223aeef8c9108210e0d13e9458b4d701781ee0 (diff)
downloadframeworks_base-7be83c578c611cd28185333696c17b2560f30444.zip
frameworks_base-7be83c578c611cd28185333696c17b2560f30444.tar.gz
frameworks_base-7be83c578c611cd28185333696c17b2560f30444.tar.bz2
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
Diffstat (limited to 'packages/SettingsLib')
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java4
1 files changed, 2 insertions, 2 deletions
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<CachedBluetoothDe
* Otherwise, allow the connect on UUID change.
*/
if (!mProfiles.isEmpty()
- && ((mConnectAttempted + timeout) > SystemClock.elapsedRealtime()
- || (mConnectAttempted == 0))) {
+ && ((mConnectAttempted + timeout) > SystemClock.elapsedRealtime())) {
connectWithoutResettingTimer(false);
}
+
dispatchAttributesChanged();
}