Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b107bfc9 authored by Yiyi Shen's avatar Yiyi Shen
Browse files

[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
parent 928942c8
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;
            }