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

Commit 3835a8cc authored by Vlad Popa's avatar Vlad Popa Committed by Android (Google) Code Review
Browse files

Merge "Filter out the volume groups which have legacy stream sco" into main

parents 4e4f8c2b 7434c98a
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;
    }