Merge "[LE Audio] Remove the broadcast icon when the device does not support broadcast feature" into tm-qpr-dev am: a7b9107027
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20271146 Change-Id: I742b41599ca0d33c7f6c33bb607a8bf89406cb6e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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