diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2009-07-10 10:04:37 -0700 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2009-07-10 10:04:37 -0700 |
commit | d48ca22b9fcea38b112aedb4126f3d030594af47 (patch) | |
tree | e32c11960900508b773e94c4aa1d08e84398d951 /packages/TtsService/src | |
parent | 38645ee6d61368f59b2d83256f2612bdaa38ff49 (diff) | |
download | frameworks_base-d48ca22b9fcea38b112aedb4126f3d030594af47.zip frameworks_base-d48ca22b9fcea38b112aedb4126f3d030594af47.tar.gz frameworks_base-d48ca22b9fcea38b112aedb4126f3d030594af47.tar.bz2 |
Use the TTS queue constants in the TTS service as defined in the
TextToSpeech class.
Diffstat (limited to 'packages/TtsService/src')
-rwxr-xr-x | packages/TtsService/src/android/tts/TtsService.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/packages/TtsService/src/android/tts/TtsService.java b/packages/TtsService/src/android/tts/TtsService.java index fdc4caf..ea22410 100755 --- a/packages/TtsService/src/android/tts/TtsService.java +++ b/packages/TtsService/src/android/tts/TtsService.java @@ -319,14 +319,14 @@ public class TtsService extends Service implements OnCompletionListener { * @param text * The text that should be spoken * @param queueMode - * 0 for no queue (interrupts all previous utterances), 1 for - * queued + * TextToSpeech.TTS_QUEUE_FLUSH for no queue (interrupts all previous utterances), + * TextToSpeech.TTS_QUEUE_ADD for queued * @param params * An ArrayList of parameters. This is not implemented for all * engines. */ private int speak(String callingApp, String text, int queueMode, ArrayList<String> params) { - if (queueMode == 0) { + if (queueMode == TextToSpeech.TTS_QUEUE_FLUSH) { stop(callingApp); } mSpeechQueue.add(new SpeechItem(callingApp, text, params, SpeechItem.TEXT)); @@ -342,15 +342,15 @@ public class TtsService extends Service implements OnCompletionListener { * @param earcon * The earcon that should be played * @param queueMode - * 0 for no queue (interrupts all previous utterances), 1 for - * queued + * TextToSpeech.TTS_QUEUE_FLUSH for no queue (interrupts all previous utterances), + * TextToSpeech.TTS_QUEUE_ADD for queued * @param params * An ArrayList of parameters. This is not implemented for all * engines. */ private int playEarcon(String callingApp, String earcon, int queueMode, ArrayList<String> params) { - if (queueMode == 0) { + if (queueMode == TextToSpeech.TTS_QUEUE_FLUSH) { stop(callingApp); } mSpeechQueue.add(new SpeechItem(callingApp, earcon, params, SpeechItem.EARCON)); @@ -408,7 +408,7 @@ public class TtsService extends Service implements OnCompletionListener { private int playSilence(String callingApp, long duration, int queueMode, ArrayList<String> params) { - if (queueMode == 0) { + if (queueMode == TextToSpeech.TTS_QUEUE_FLUSH) { stop(callingApp); } mSpeechQueue.add(new SpeechItem(callingApp, duration)); @@ -759,8 +759,8 @@ public class TtsService extends Service implements OnCompletionListener { * @param text * The text that should be spoken * @param queueMode - * 0 for no queue (interrupts all previous utterances), 1 for - * queued + * TextToSpeech.TTS_QUEUE_FLUSH for no queue (interrupts all previous utterances) + * TextToSpeech.TTS_QUEUE_ADD for queued * @param params * An ArrayList of parameters. The first element of this * array controls the type of voice to use. @@ -779,8 +779,8 @@ public class TtsService extends Service implements OnCompletionListener { * @param earcon * The earcon that should be played * @param queueMode - * 0 for no queue (interrupts all previous utterances), 1 for - * queued + * TextToSpeech.TTS_QUEUE_FLUSH for no queue (interrupts all previous utterances) + * TextToSpeech.TTS_QUEUE_ADD for queued * @param params * An ArrayList of parameters. */ @@ -798,8 +798,8 @@ public class TtsService extends Service implements OnCompletionListener { * @param duration * The duration of the silence that should be played * @param queueMode - * 0 for no queue (interrupts all previous utterances), 1 for - * queued + * TextToSpeech.TTS_QUEUE_FLUSH for no queue (interrupts all previous utterances) + * TextToSpeech.TTS_QUEUE_ADD for queued * @param params * An ArrayList of parameters. */ |