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

Commit 9b57d573 authored by Eric Laurent's avatar Eric Laurent
Browse files

AudioAttributes: add missing stream type to conversions

Add STREAM_ASSISTANT to conversions from legacy stream type
to usage and content type.

Test: Make
Change-Id: I4bc307b7ff4befeb2f6318626949a89235e89bcf
parent cacb978b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1157,6 +1157,9 @@ public final class AudioAttributes implements Parcelable {
                    case AudioSystem.STREAM_ACCESSIBILITY:
                        mContentType = CONTENT_TYPE_SPEECH;
                        break;
                    case AudioSystem.STREAM_ASSISTANT:
                        mContentType = CONTENT_TYPE_SPEECH;
                        break;
                    default:
                        Log.e(TAG, "Invalid stream type " + streamType + " for AudioAttributes");
                }
@@ -1571,6 +1574,8 @@ public final class AudioAttributes implements Parcelable {
                return USAGE_VOICE_COMMUNICATION_SIGNALLING;
            case AudioSystem.STREAM_ACCESSIBILITY:
                return USAGE_ASSISTANCE_ACCESSIBILITY;
            case AudioSystem.STREAM_ASSISTANT:
                return USAGE_ASSISTANT;
            case AudioSystem.STREAM_TTS:
            default:
                return USAGE_UNKNOWN;