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

Commit c08411ce authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Android Git Automerger
Browse files

am 1126aad7: Revert the setLanguage() call to its previous implementation as...

am 1126aad7: Revert the setLanguage() call to its previous implementation as waiting to change the language right before a call to speak can put the engine in an unstable state.

Merge commit '1126aad7'

* commit '1126aad7':
  Revert the setLanguage() call to its previous implementation as
parents 6f3512b1 1126aad7
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -921,10 +921,8 @@ public class TextToSpeech {
                mCachedParams[Engine.TTS_PARAM_POSITION_LANGUAGE + 1] = loc.getISO3Language();
                mCachedParams[Engine.TTS_PARAM_POSITION_COUNTRY + 1] = loc.getISO3Country();
                mCachedParams[Engine.TTS_PARAM_POSITION_VARIANT + 1] = loc.getVariant();
                // the language is not set here, instead it is cached so it will be associated
                // with all upcoming utterances. But we still need to change the language support,
                // which is achieved by calling isLanguageAvailable()
                result = mITts.isLanguageAvailable(

                result = mITts.setLanguage(mPackageName,
                        mCachedParams[Engine.TTS_PARAM_POSITION_LANGUAGE + 1],
                        mCachedParams[Engine.TTS_PARAM_POSITION_COUNTRY + 1],
                        mCachedParams[Engine.TTS_PARAM_POSITION_VARIANT + 1] );