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
This commit is contained in:
Eric Laurent
2021-11-29 15:20:32 +01:00
parent cacb978b2a
commit 9b57d57323

View File

@@ -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;