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

Commit 7228d0fd authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 8213 into donut

* changes:
  Resetting the setLanguage() call to its intended behavior after change 8089 which works around the bug where a language cannot be set if the default language (which is loaded upon initialization) isn't eng-USA.
parents 26654274 9c53a5c0
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -921,8 +921,10 @@ 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();

                result = mITts.setLanguage(mPackageName,
                // the language is not set here, instead it is cached so it will be associated
                // with all upcoming utterances. But we still need to report the language support,
                // which is achieved by calling isLanguageAvailable()
                result = mITts.isLanguageAvailable(
                        mCachedParams[Engine.TTS_PARAM_POSITION_LANGUAGE + 1],
                        mCachedParams[Engine.TTS_PARAM_POSITION_COUNTRY + 1],
                        mCachedParams[Engine.TTS_PARAM_POSITION_VARIANT + 1] );