diff --git a/packages/SettingsLib/res/drawable/ic_earbuds_advanced.xml b/packages/SettingsLib/res/drawable/ic_earbuds_advanced.xml
new file mode 100644
index 0000000000000..b70da34580af6
--- /dev/null
+++ b/packages/SettingsLib/res/drawable/ic_earbuds_advanced.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
diff --git a/packages/SettingsLib/src/com/android/settingslib/media/BluetoothMediaDevice.java b/packages/SettingsLib/src/com/android/settingslib/media/BluetoothMediaDevice.java
index afafd9f27e958..1be9d76cf3ebf 100644
--- a/packages/SettingsLib/src/com/android/settingslib/media/BluetoothMediaDevice.java
+++ b/packages/SettingsLib/src/com/android/settingslib/media/BluetoothMediaDevice.java
@@ -59,12 +59,16 @@ public class BluetoothMediaDevice extends MediaDevice {
@Override
public Drawable getIcon() {
- return BluetoothUtils.getBtClassDrawableWithDescription(mContext, mCachedDevice).first;
+ return BluetoothUtils.isAdvancedDetailsHeader(mCachedDevice.getDevice())
+ ? mContext.getDrawable(R.drawable.ic_earbuds_advanced)
+ : BluetoothUtils.getBtClassDrawableWithDescription(mContext, mCachedDevice).first;
}
@Override
public Drawable getIconWithoutBackground() {
- return BluetoothUtils.getBtClassDrawableWithDescription(mContext, mCachedDevice).first;
+ return BluetoothUtils.isAdvancedDetailsHeader(mCachedDevice.getDevice())
+ ? mContext.getDrawable(R.drawable.ic_earbuds_advanced)
+ : BluetoothUtils.getBtClassDrawableWithDescription(mContext, mCachedDevice).first;
}
@Override
diff --git a/packages/SettingsLib/src/com/android/settingslib/media/MediaDevice.java b/packages/SettingsLib/src/com/android/settingslib/media/MediaDevice.java
index affcf585904aa..1804e86a98f0d 100644
--- a/packages/SettingsLib/src/com/android/settingslib/media/MediaDevice.java
+++ b/packages/SettingsLib/src/com/android/settingslib/media/MediaDevice.java
@@ -350,11 +350,6 @@ public abstract class MediaDevice implements Comparable {
return 1;
}
- // Both devices have same connection status, compare the range zone
- if (NearbyDevice.compareRangeZones(getRangeZone(), another.getRangeZone()) != 0) {
- return NearbyDevice.compareRangeZones(getRangeZone(), another.getRangeZone());
- }
-
if (mType == another.mType) {
// Check device is muting expected device
if (isMutingExpectedDevice()) {
@@ -377,6 +372,11 @@ public abstract class MediaDevice implements Comparable {
return 1;
}
+ // Both devices have same connection status and type, compare the range zone
+ if (NearbyDevice.compareRangeZones(getRangeZone(), another.getRangeZone()) != 0) {
+ return NearbyDevice.compareRangeZones(getRangeZone(), another.getRangeZone());
+ }
+
// Set last used device at the first item
final String lastSelectedDevice = ConnectionRecordManager.getInstance()
.getLastSelectedDevice();
diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputAdapter.java b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputAdapter.java
index 5430ee67e6ef9..24dfeafa0decb 100644
--- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputAdapter.java
+++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputAdapter.java
@@ -41,8 +41,6 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter {
private static final String TAG = "MediaOutputAdapter";
private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
- private static final float DEVICE_DISCONNECTED_ALPHA = 0.5f;
- private static final float DEVICE_CONNECTED_ALPHA = 1f;
private final MediaOutputDialog mMediaOutputDialog;
private ViewGroup mConnectedItem;
@@ -130,14 +128,6 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter {
if (mCurrentActivePosition == position) {
mCurrentActivePosition = -1;
}
- if (device.getDeviceType() == MediaDevice.MediaDeviceType.TYPE_BLUETOOTH_DEVICE
- && !device.isConnected()) {
- mTitleText.setAlpha(DEVICE_DISCONNECTED_ALPHA);
- mTitleIcon.setAlpha(DEVICE_DISCONNECTED_ALPHA);
- } else {
- mTitleText.setAlpha(DEVICE_CONNECTED_ALPHA);
- mTitleIcon.setAlpha(DEVICE_CONNECTED_ALPHA);
- }
if (mController.isTransferring()) {
if (device.getState() == MediaDeviceState.STATE_CONNECTING
@@ -158,8 +148,6 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter {
// Set different layout for each device
if (device.getState() == MediaDeviceState.STATE_CONNECTING_FAILED) {
setUpDeviceIcon(device);
- mTitleText.setAlpha(DEVICE_CONNECTED_ALPHA);
- mTitleIcon.setAlpha(DEVICE_CONNECTED_ALPHA);
mStatusIcon.setImageDrawable(
mContext.getDrawable(R.drawable.media_output_status_failed));
mStatusIcon.setColorFilter(mController.getColorItemContent());
@@ -196,10 +184,6 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter {
? (buttonView, isChecked) -> onGroupActionTriggered(false, device)
: null);
mCheckBox.setEnabled(isDeviceDeselectable);
- mCheckBox.setAlpha(
- isDeviceDeselectable ? DEVICE_CONNECTED_ALPHA
- : DEVICE_DISCONNECTED_ALPHA
- );
setCheckBoxColor(mCheckBox, mController.getColorItemContent());
initSeekbar(device, isCurrentSeekbarInvisible);
mEndTouchArea.setVisibility(View.VISIBLE);