am ec0cf8bc: Merge change 5554 into donut
Merge commit 'ec0cf8bc874f53cfc7256628f0ec56657ac92073' * commit 'ec0cf8bc874f53cfc7256628f0ec56657ac92073': Adding in the playSilence method to TextToSpeech.java
This commit is contained in:
committed by
The Android Open Source Project
commit
0e04f18ec7
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user