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
diff --git a/src/com/android/settings/bluetooth/BluetoothDevicePreference.java b/src/com/android/settings/bluetooth/BluetoothDevicePreference.java
index 80a3d1f..6481f2a 100644
--- a/src/com/android/settings/bluetooth/BluetoothDevicePreference.java
+++ b/src/com/android/settings/bluetooth/BluetoothDevicePreference.java
@@ -232,7 +232,7 @@
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) {