Listed order on "previously connected" depend on recently connected devices

This CL use Bluetooth api "getMostRecentlyConnectedDevices()" to get
recently connected devices list. Let "previously connected" will list
most recently connected device on the top.

Bug: 130984590
Test: make -j42 RunSettingsRoboTests
Change-Id: I8d425b6da6cb9fe9fd1417937b4cb9a052cd1660
This commit is contained in:
hughchen
2020-02-03 13:59:06 +08:00
parent 07c1cdb77e
commit 043e43f059
3 changed files with 35 additions and 2 deletions

View File

@@ -60,10 +60,12 @@ public final class BluetoothDevicePreference extends GearPreference implements
@Retention(RetentionPolicy.SOURCE)
@IntDef({SortType.TYPE_DEFAULT,
SortType.TYPE_FIFO})
SortType.TYPE_FIFO,
SortType.TYPE_NO_SORT})
public @interface SortType {
int TYPE_DEFAULT = 1;
int TYPE_FIFO = 2;
int TYPE_NO_SORT = 3;
}
private final CachedBluetoothDevice mCachedDevice;