[Audiosharing] Fix volume control error display.
Avoid showing the volume control when the device is not acting as the sharing source. Bug: 305620450 Test: manual Change-Id: I162681d5d0cd84d19c351dce8cfdf833734bbb1b
This commit is contained in:
@@ -51,9 +51,10 @@ public class AudioSharingDeviceVolumeControlUpdater extends BluetoothDeviceUpdat
|
||||
public boolean isFilterMatched(CachedBluetoothDevice cachedDevice) {
|
||||
boolean isFilterMatched = false;
|
||||
if (isDeviceConnected(cachedDevice) && isDeviceInCachedDevicesList(cachedDevice)) {
|
||||
// If device is LE audio device and has a broadcast source,
|
||||
// it would show in audio sharing devices group.
|
||||
// If device is LE audio device and in a sharing session on current sharing device,
|
||||
// it would show in volume control group.
|
||||
if (cachedDevice.isConnectedLeAudioDevice()
|
||||
&& AudioSharingUtils.isBroadcasting(mLocalBtManager)
|
||||
&& AudioSharingUtils.hasBroadcastSource(cachedDevice, mLocalBtManager)) {
|
||||
isFilterMatched = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user