From 89377530c70f757aebdb5b953b73869242994265 Mon Sep 17 00:00:00 2001 From: Tsuyoshi Kamata Date: Wed, 18 Dec 2013 19:05:17 +0900 Subject: [PATCH] Display BTH connected status correctly This patch removes incorrect condition. (to not use LocalBluetoothProfile#isPreferred()) This condition uses the priority that already disconnected profile, so this codition always returns false. To verify this issue: 1. Turn on Bluetooth. 2. Pair and connect to BTH(A2DP/HFP) 3. The display now says "Connected" 3. Disconnect HFP profile 4. The display still says "Connected" but it should say "Connected (no phone)" Change-Id: I9e2bfa6d23bf1be7587c9556b4b05459d02c4817 --- .../android/settings/bluetooth/BluetoothDevicePreference.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/bluetooth/BluetoothDevicePreference.java b/src/com/android/settings/bluetooth/BluetoothDevicePreference.java index 80a3d1f01c7..6481f2a07dd 100644 --- a/src/com/android/settings/bluetooth/BluetoothDevicePreference.java +++ b/src/com/android/settings/bluetooth/BluetoothDevicePreference.java @@ -232,7 +232,7 @@ public final class BluetoothDevicePreference extends Preference implements break; case BluetoothProfile.STATE_DISCONNECTED: - if (profile.isProfileReady() && profile.isPreferred(cachedDevice.getDevice())) { + if (profile.isProfileReady()) { if (profile instanceof A2dpProfile) { a2dpNotConnected = true; } else if (profile instanceof HeadsetProfile) {