summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-06-26 15:20:36 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-06-26 15:20:36 -0700
commitec0cf8bc874f53cfc7256628f0ec56657ac92073 (patch)
treed65909955e7ccea6d7485162f17934b1d87261b6 /core
parentae3522734ef83254626cacee18a9490f6af62415 (diff)
parentf032bc7da536774a0b6a1c77632c65b935eee6fa (diff)
downloadframeworks_base-ec0cf8bc874f53cfc7256628f0ec56657ac92073.zip
frameworks_base-ec0cf8bc874f53cfc7256628f0ec56657ac92073.tar.gz
frameworks_base-ec0cf8bc874f53cfc7256628f0ec56657ac92073.tar.bz2
Merge change 5554 into donut
* changes: Adding in the playSilence method to TextToSpeech.java
Diffstat (limited to 'core')
-rwxr-xr-xcore/java/android/speech/tts/TextToSpeech.java22
1 files changed, 21 insertions, 1 deletions
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index 1502d98..41b25ec 100755
--- a/core/java/android/speech/tts/TextToSpeech.java
+++ b/core/java/android/speech/tts/TextToSpeech.java
@@ -410,7 +410,27 @@ public class TextToSpeech {
public void playSilence(long durationInMs, int queueMode) {
- // TODO implement, already present in TTS service
+ synchronized (mStartLock) {
+ if (!mStarted) {
+ return;
+ }
+ try {
+ // TODO support extra parameters, passing cache of current parameters for the moment
+ mITts.playSilence(durationInMs, queueMode, mCachedParams);
+ } catch (RemoteException e) {
+ // TTS died; restart it.
+ mStarted = false;
+ initTts();
+ } catch (NullPointerException e) {
+ // TTS died; restart it.
+ mStarted = false;
+ initTts();
+ } catch (IllegalStateException e) {
+ // TTS died; restart it.
+ mStarted = false;
+ initTts();
+ }
+ }
}