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
This commit is contained in:
Tsuyoshi Kamata
2013-12-18 19:05:17 +09:00
committed by Zhihai Xu
parent 4c94185028
commit 89377530c7

View File

@@ -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) {