Fix superfluous onError callbacks.
When stop() is called twice or after done().This relates to bug 5662598 because users using the old deprecated API will see two calls to onUtteranceCompleted. bug:5662598 Change-Id: I5d59cf66b4f4c8650d3f8f9e503ac3f33132c0d0
This commit is contained in:
@@ -428,7 +428,8 @@ class AudioPlaybackHandler {
|
||||
final AudioTrack audioTrack = params.getAudioTrack();
|
||||
|
||||
if (audioTrack == null) {
|
||||
params.getDispatcher().dispatchOnError();
|
||||
// There was already a call to handleSynthesisDone for
|
||||
// this token.
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user