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

Commit 76b988ad authored by Tomoharu Kasahara's avatar Tomoharu Kasahara Committed by android-build-merger
Browse files

Merge "Convert AudioAttribute to Stream correctly for TTS" am: 874e10f4

am: 96b6adc0

Change-Id: Id90684e28b0fc33be3301c6adf0683be239ae0d0
parents 6e3f6f04 96b6adc0
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()) {