Merge "Convert AudioAttribute to Stream correctly for TTS"
This commit is contained in:
@@ -715,6 +715,7 @@ public final class AudioAttributes implements Parcelable {
|
|||||||
break;
|
break;
|
||||||
case AudioSystem.STREAM_TTS:
|
case AudioSystem.STREAM_TTS:
|
||||||
mContentType = CONTENT_TYPE_SONIFICATION;
|
mContentType = CONTENT_TYPE_SONIFICATION;
|
||||||
|
mFlags |= FLAG_BEACON;
|
||||||
break;
|
break;
|
||||||
case AudioSystem.STREAM_ACCESSIBILITY:
|
case AudioSystem.STREAM_ACCESSIBILITY:
|
||||||
mContentType = CONTENT_TYPE_SPEECH;
|
mContentType = CONTENT_TYPE_SPEECH;
|
||||||
@@ -1039,6 +1040,10 @@ public final class AudioAttributes implements Parcelable {
|
|||||||
return fromGetVolumeControlStream ?
|
return fromGetVolumeControlStream ?
|
||||||
AudioSystem.STREAM_VOICE_CALL : AudioSystem.STREAM_BLUETOOTH_SCO;
|
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
|
// usage to stream type mapping
|
||||||
switch (aa.getUsage()) {
|
switch (aa.getUsage()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user