Merge "[Fix] Bluetooth device ordering" into rvc-qpr-dev am: a6b0836e95
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13755425 Change-Id: Ib466ddd323da4c09d002b7e90d1ba0045425c216
This commit is contained in:
@@ -205,7 +205,6 @@ public class LocalMediaManager implements BluetoothCallback {
|
||||
|
||||
void dispatchDeviceListUpdate() {
|
||||
final List<MediaDevice> mediaDevices = new ArrayList<>(mMediaDevices);
|
||||
Collections.sort(mediaDevices, COMPARATOR);
|
||||
for (DeviceCallback callback : getCallbacks()) {
|
||||
callback.onDeviceListUpdate(mediaDevices);
|
||||
}
|
||||
@@ -465,6 +464,7 @@ public class LocalMediaManager implements BluetoothCallback {
|
||||
synchronized (mMediaDevicesLock) {
|
||||
mMediaDevices.clear();
|
||||
mMediaDevices.addAll(devices);
|
||||
Collections.sort(devices, COMPARATOR);
|
||||
// Add disconnected bluetooth devices only when phone output device is available.
|
||||
for (MediaDevice device : devices) {
|
||||
final int type = device.getDeviceType();
|
||||
|
||||
Reference in New Issue
Block a user