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

Commit 874e10f4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Convert AudioAttribute to Stream correctly for TTS"

parents 26e686a9 be0103c0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -715,6 +715,7 @@ public final class AudioAttributes implements Parcelable {
                    break;
                case AudioSystem.STREAM_TTS:
                    mContentType = CONTENT_TYPE_SONIFICATION;
                    mFlags |= FLAG_BEACON;
                    break;
                case AudioSystem.STREAM_ACCESSIBILITY:
                    mContentType = CONTENT_TYPE_SPEECH;
@@ -1039,6 +1040,10 @@ public final class AudioAttributes implements Parcelable {
            return fromGetVolumeControlStream ?
                    AudioSystem.STREAM_VOICE_CALL : AudioSystem.STREAM_BLUETOOTH_SCO;
        }
        if ((aa.getAllFlags() & FLAG_BEACON) == FLAG_BEACON) {
            return fromGetVolumeControlStream ?
                    AudioSystem.STREAM_MUSIC : AudioSystem.STREAM_TTS;
        }

        // usage to stream type mapping
        switch (aa.getUsage()) {