OSDN Git Service

Bug 3365937 notify TTS initialization listener of binding errors
authorJean-Michel Trivi <jmtrivi@google.com>
Fri, 21 Jan 2011 01:25:48 +0000 (17:25 -0800)
committerJean-Michel Trivi <jmtrivi@google.com>
Fri, 21 Jan 2011 01:25:48 +0000 (17:25 -0800)
commit1e13a02320aa165c22172d43b2b3c3cd8ad35cf7
tree7aabe6e8656203b7dfb3bb19b305b2521bc2570a
parent822d4ce61687d386f9630b33113c6193257d6878
Bug 3365937 notify TTS initialization listener of binding errors

The creation of a TextToSpeech object causes the TTS service to
 start, and the initialization listener to be called when the
 service is connected. But the listener is never called when
 the service binding failed to be notified of this error.
The fix consists in checking the result of the bind to service
 operation, and notify the listener in case of an error.

More log was added in case speak() and synthesizeToFile() are
 called but the service is not known to have started.

Change-Id: I7dcc1fa44be31fee3177ec6215fca3306377b934
core/java/android/speech/tts/TextToSpeech.java