diff options
author | Jack Yu <jackyu@google.com> | 2018-05-11 14:19:44 -0700 |
---|---|---|
committer | Jack Yu <jackyu@google.com> | 2018-05-11 16:25:46 -0700 |
commit | 0d332538c90796265931aa141ad3d97b63e84724 (patch) | |
tree | 2c6e07eeac98e3c533542a1cba0eeed1b9d33044 | |
parent | 43ebd760e1e424ae97e05058c0cab904317db018 (diff) | |
download | CellBroadcastReceiver-0d332538c90796265931aa141ad3d97b63e84724.tar.gz |
Fixed that TTS and alert tone are in different audio channels
Now both text to speech and alert tone are using the alarm
channels.
Test: Manual
Bug: 79355649
Change-Id: Ifd29f98aa02392dcadc000df362691cfdd11e960
-rw-r--r-- | src/com/android/cellbroadcastreceiver/CellBroadcastAlertAudio.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/cellbroadcastreceiver/CellBroadcastAlertAudio.java b/src/com/android/cellbroadcastreceiver/CellBroadcastAlertAudio.java index 327cf8b26..bb869f5f4 100644 --- a/src/com/android/cellbroadcastreceiver/CellBroadcastAlertAudio.java +++ b/src/com/android/cellbroadcastreceiver/CellBroadcastAlertAudio.java @@ -148,9 +148,10 @@ public class CellBroadcastAlertAudio extends Service implements TextToSpeech.OnI if (DBG) log("Speaking broadcast text: " + mMessageBody); Bundle params = new Bundle(); - // Play TTS in notification stream. + // Play TTS in the alarm stream, which we use for playing alert tones as + // well. params.putInt(TextToSpeech.Engine.KEY_PARAM_STREAM, - AudioManager.STREAM_NOTIFICATION); + AudioManager.STREAM_ALARM); // Use the non-public parameter 2 --> TextToSpeech.QUEUE_DESTROY for TTS. // The entire playback queue is purged. This is different from QUEUE_FLUSH // in that all entries are purged, not just entries from a given caller. |