Show subtext for previously connected devices on BT card

Fixes: 157089483
Test: visual, robotest
Change-Id: If4f2dec9df802a80a686827de7e61115e85d54a7
This commit is contained in:
Jason Chiu
2020-05-20 17:02:43 +08:00
parent fa1e102af7
commit 07767907d5

View File

@@ -294,10 +294,15 @@ public class BluetoothDevicesSlice implements CustomSliceable {
final List<ListBuilder.RowBuilder> bluetoothRows = new ArrayList<>();
// Create row builders based on paired devices.
for (CachedBluetoothDevice device : getPairedBluetoothDevices()) {
String summary = device.getConnectionSummary();
if (summary == null) {
summary = mContext.getString(
R.string.connected_device_previously_connected_screen_title);
}
final ListBuilder.RowBuilder rowBuilder = new ListBuilder.RowBuilder()
.setTitleItem(getBluetoothDeviceIcon(device), ListBuilder.ICON_IMAGE)
.setTitle(device.getName())
.setSubtitle(device.getConnectionSummary());
.setSubtitle(summary);
if (mAvailableMediaBtDeviceUpdater.isFilterMatched(device)
|| mSavedBtDeviceUpdater.isFilterMatched(device)) {