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

Commit 7434c98a authored by Vlad Popa's avatar Vlad Popa
Browse files

Filter out the volume groups which have legacy stream sco

Test: atest com.android.audiopolicytest.AudioManagerTest#testVolumeGroupCallback
Bug: 418888102
Flag: EXEMPT bugfix
Change-Id: I9ea2e1c9135fd5dd435d8296a7ffdedce73e68be
parent a4fc9ffb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.media.AudioAttributes;
import android.media.AudioManager;
import android.media.AudioSystem;
import android.os.Parcel;
import android.os.Parcelable;
@@ -86,6 +87,8 @@ public final class AudioVolumeGroup implements Parcelable {
            Log.w(TAG, ": listAudioVolumeGroups failed");
        }
        avgList.removeIf(avg -> avg.isInternalGroup());
        avgList.removeIf(avg -> avg.getLegacyStreamTypes().length == 1
                && avg.getLegacyStreamTypes()[0] == AudioManager.STREAM_BLUETOOTH_SCO);
        return avgList;
    }