Merge "Convert AudioAttribute to Stream correctly for TTS" am: 874e10f4a6 am: 96b6adc014
am: 76b988ad23
Change-Id: I9935ce0eaaa1f50246c242c0190cb4408b243248
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user