Merge "[LE Audio] Remove the broadcast icon when the device does not support broadcast feature" into tm-qpr-dev

This commit is contained in:
Betty Chang
2022-10-25 08:49:56 +00:00
committed by Android (Google) Code Review
4 changed files with 52 additions and 3 deletions

View File

@@ -165,6 +165,13 @@ public class MediaOutputIndicatorWorker extends SliceBackgroundWorker implements
return mPackageName;
}
/** Check if this device supports LE Audio Broadcast feature */
public boolean isBroadcastSupported() {
LocalBluetoothLeBroadcast broadcast =
mLocalBluetoothManager.getProfileManager().getLeAudioBroadcastProfile();
return broadcast != null ? true : false;
}
public boolean isDeviceBroadcasting() {
LocalBluetoothLeBroadcast broadcast =
mLocalBluetoothManager.getProfileManager().getLeAudioBroadcastProfile();

View File

@@ -93,7 +93,7 @@ public class MediaVolumePreferenceController extends VolumeSeekBarPreferenceCont
@VisibleForTesting
boolean isSupportEndItem() {
return isConnectedBLEDevice();
return getWorker() != null && getWorker().isBroadcastSupported() && isConnectedBLEDevice();
}
private boolean isConnectedBLEDevice() {