Skip to content

Commit a6e16b8

Browse files
committed
SynthesisCallback documentation update
Clarification about when android.speech.tts.SynthesisCallback.done() should be called. Bug: 2481825 Change-Id: Ic781a6facc2d9acb3f06afb952fbac0b494c56cf
1 parent 1a8d0f7 commit a6e16b8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/java/android/speech/tts/SynthesisCallback.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@
2222
* {@link #start}, then {@link #audioAvailable} until all audio has been provided, then finally
2323
* {@link #done}.
2424
*
25-
*
2625
* {@link #error} can be called at any stage in the synthesis process to
2726
* indicate that an error has occurred, but if the call is made after a call
2827
* to {@link #done}, it might be discarded.
28+
*
29+
* After {@link #start} been called, {@link #done} must be called regardless of errors.
2930
*/
3031
public interface SynthesisCallback {
3132
/**
@@ -72,6 +73,8 @@ public interface SynthesisCallback {
7273
* This method should only be called on the synthesis thread,
7374
* while in {@link TextToSpeechService#onSynthesizeText}.
7475
*
76+
* This method has to be called if {@link #start} was called.
77+
*
7578
* @return {@link TextToSpeech#SUCCESS} or {@link TextToSpeech#ERROR}.
7679
*/
7780
public int done();

0 commit comments

Comments
 (0)