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:
Narayan Kamath
2011-11-30 12:23:40 +00:00
parent bb1e7d4324
commit cc084f1d73

View File

@@ -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;
}