[LE Audio] Remove the broadcast icon when the device does not support
broadcast feature Bug: 254743785 Test: manual test Test: make RunSettingsRoboTests ROBOTEST_FILTER=MediaOutputIndicatorWorkerTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=MediaVolumePreferenceControllerTest Change-Id: I02e429b3a306e2f9b0e2342118649208617c4944
This commit is contained in:
@@ -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();
|
||||
|
@@ -93,7 +93,7 @@ public class MediaVolumePreferenceController extends VolumeSeekBarPreferenceCont
|
||||
|
||||
@VisibleForTesting
|
||||
boolean isSupportEndItem() {
|
||||
return isConnectedBLEDevice();
|
||||
return getWorker() != null && getWorker().isBroadcastSupported() && isConnectedBLEDevice();
|
||||
}
|
||||
|
||||
private boolean isConnectedBLEDevice() {
|
||||
|
Reference in New Issue
Block a user