OSDN Git Service

Fix double call to TTS connection disconnect() on reconnect
authorPrzemyslaw Szczepaniak <pszczepaniak@google.com>
Thu, 16 Aug 2012 15:34:54 +0000 (16:34 +0100)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Mon, 20 Aug 2012 15:56:39 +0000 (08:56 -0700)
commit091d56cab8f6f6a3460fbb596f99b1a262948e96
treef2b10b744ca031398890967c455de6253591fe65
parentbf5740e75efd87ae0213486e78e029403804c6f0
Fix double call to TTS connection disconnect() on reconnect

- Sets the service connection to null when unbindService is called,
instead of in onServiceDisconnected. This avoids a double disconnect
if a call to onServiceConnected is received before a call to
onServiceDisconnected.

- Extended synchronize on runAction error handling and reconnection.
This prevents from reconnecting N times if N>1 threads enter this method
while there's issue with TTS service.

Bug:6993880
Change-Id: I5a387622c6032a18d17fc072029ae6be1a9b8e6c
core/java/android/speech/tts/TextToSpeech.java