summaryrefslogtreecommitdiffstats
path: root/core/java/android/speech
diff options
context:
space:
mode:
authorPrzemyslaw Szczepaniak <pszczepaniak@google.com>2012-10-15 10:57:33 +0100
committerPrzemyslaw Szczepaniak <pszczepaniak@google.com>2012-10-15 13:07:11 +0100
commita6e16b86b9f708b4869e123c7c67f6d5675cca18 (patch)
treed558db52636c9eb228431f65f2be88b8f5b35056 /core/java/android/speech
parent1a8d0f7a946e23d09a497c72e54db7a422512dba (diff)
downloadframeworks_base-a6e16b86b9f708b4869e123c7c67f6d5675cca18.zip
frameworks_base-a6e16b86b9f708b4869e123c7c67f6d5675cca18.tar.gz
frameworks_base-a6e16b86b9f708b4869e123c7c67f6d5675cca18.tar.bz2
SynthesisCallback documentation update
Clarification about when android.speech.tts.SynthesisCallback.done() should be called. Bug: 2481825 Change-Id: Ic781a6facc2d9acb3f06afb952fbac0b494c56cf
Diffstat (limited to 'core/java/android/speech')
-rw-r--r--core/java/android/speech/tts/SynthesisCallback.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/speech/tts/SynthesisCallback.java b/core/java/android/speech/tts/SynthesisCallback.java
index d70c371..f98bb09 100644
--- a/core/java/android/speech/tts/SynthesisCallback.java
+++ b/core/java/android/speech/tts/SynthesisCallback.java
@@ -22,10 +22,11 @@ package android.speech.tts;
* {@link #start}, then {@link #audioAvailable} until all audio has been provided, then finally
* {@link #done}.
*
- *
* {@link #error} can be called at any stage in the synthesis process to
* indicate that an error has occurred, but if the call is made after a call
* to {@link #done}, it might be discarded.
+ *
+ * After {@link #start} been called, {@link #done} must be called regardless of errors.
*/
public interface SynthesisCallback {
/**
@@ -72,6 +73,8 @@ public interface SynthesisCallback {
* This method should only be called on the synthesis thread,
* while in {@link TextToSpeechService#onSynthesizeText}.
*
+ * This method has to be called if {@link #start} was called.
+ *
* @return {@link TextToSpeech#SUCCESS} or {@link TextToSpeech#ERROR}.
*/
public int done();