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:
committed by
Zhihai Xu
parent
4c94185028
commit
89377530c7
@@ -232,7 +232,7 @@ public final class BluetoothDevicePreference extends Preference implements
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case BluetoothProfile.STATE_DISCONNECTED:
|
case BluetoothProfile.STATE_DISCONNECTED:
|
||||||
if (profile.isProfileReady() && profile.isPreferred(cachedDevice.getDevice())) {
|
if (profile.isProfileReady()) {
|
||||||
if (profile instanceof A2dpProfile) {
|
if (profile instanceof A2dpProfile) {
|
||||||
a2dpNotConnected = true;
|
a2dpNotConnected = true;
|
||||||
} else if (profile instanceof HeadsetProfile) {
|
} else if (profile instanceof HeadsetProfile) {
|
||||||
|
Reference in New Issue
Block a user