Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f032bc7d authored by Charles Chen's avatar Charles Chen
Browse files

Adding in the playSilence method to TextToSpeech.java

parent d09f86ce
Loading
Loading
Loading
Loading
+21 −1
Original line number Diff line number Diff line
@@ -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();
            }
        }
    }