The UI only shows the active LE device am: 7f6fcce1d5
am: 787a0e0249
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2138452 Change-Id: I6e57db85b4d10586d111e39dcd7ee77e67fd9d74 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -66,7 +66,7 @@ public class AvailableMediaBluetoothDeviceUpdater extends BluetoothDeviceUpdater
|
||||
}
|
||||
|
||||
boolean isFilterMatched = false;
|
||||
if (isDeviceConnected(cachedDevice)) {
|
||||
if (isDeviceConnected(cachedDevice) && isDeviceInCachedDevicesList(cachedDevice)) {
|
||||
if (DBG) {
|
||||
Log.d(TAG, "isFilterMatched() current audio profile : " + currentAudioProfile);
|
||||
}
|
||||
@@ -74,6 +74,8 @@ public class AvailableMediaBluetoothDeviceUpdater extends BluetoothDeviceUpdater
|
||||
// It would show in Available Devices group.
|
||||
if (cachedDevice.isConnectedHearingAidDevice()
|
||||
|| cachedDevice.isConnectedLeAudioDevice()) {
|
||||
Log.d(TAG, "isFilterMatched() device : " +
|
||||
cachedDevice.getName() + ", the profile is connected.");
|
||||
return true;
|
||||
}
|
||||
// According to the current audio profile type,
|
||||
|
@@ -326,4 +326,8 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback,
|
||||
((BluetoothDevicePreference) preference).onPreferenceAttributesChanged();
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean isDeviceInCachedDevicesList(CachedBluetoothDevice cachedDevice){
|
||||
return mLocalManager.getCachedDeviceManager().getCachedDevicesCopy().contains(cachedDevice);
|
||||
}
|
||||
}
|
||||
|
@@ -66,7 +66,7 @@ public class ConnectedBluetoothDeviceUpdater extends BluetoothDeviceUpdater {
|
||||
}
|
||||
|
||||
boolean isFilterMatched = false;
|
||||
if (isDeviceConnected(cachedDevice)) {
|
||||
if (isDeviceConnected(cachedDevice) && isDeviceInCachedDevicesList(cachedDevice)) {
|
||||
if (DBG) {
|
||||
Log.d(TAG, "isFilterMatched() current audio profile : " + currentAudioProfile);
|
||||
}
|
||||
|
@@ -106,7 +106,8 @@ public class SavedBluetoothDeviceUpdater extends BluetoothDeviceUpdater
|
||||
+ cachedDevice.isConnected());
|
||||
}
|
||||
return device.getBondState() == BluetoothDevice.BOND_BONDED
|
||||
&& (mDisplayConnected || !device.isConnected());
|
||||
&& (mDisplayConnected || (!device.isConnected() && isDeviceInCachedDevicesList(
|
||||
cachedDevice)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user