Making sure that the language, country, and variant defaults are always
set to something to ensure that there won't be an NPE.
Dismissing the ListPreference dialogs before a rotation to avoid list
data corruption caused by the list being displayed while its data is
being re-initialized.
Change-Id: Iecdb3b4d415542dc8a4db162c930e6a6570a55f2
the current engine that the user has selected when displaying
the list of engines that are available.
Change-Id: I77d35ff1c691fd3e5c967fcf367647d415d2468e
take the user to Market after clicking on "Install Voice Data" in
the TTS Settings page.
Launching the Activity for the installation of the TTS data should
be a distinct task, dissociated from the one associated with the
Settings app. Also the intent ACTION_INSTALL_TTS_DATA doesn't return
a result, so the activity should be started with startActivity()
rather than startActivityForResult().
when the UI is in Japanese.
Rewrite of the initialization of the default language in the TTS Settings.
The previous implementation had the following issues:
- the "Listen to an example" didn't use the default settings
- the string used for the example didn't match the selected language
(this was in order to not imply that TTS is doing translation, but
that proved confusing to users).
The language initialization is now implemented in initDefaultLang()
and ensures that the default locale is one supported in the array
of available locales.
The speech rate is also initialized from the settings or the
default rate (if no value was stored in the settings).
Use the current Locale upon initialization of the TTS engine.
Retrieve the default engine value from the TextToSpeech.Engine class
instead of a hard-coded value in TextToSpeechSettings.
in the language pref list (bug was no selection in the default language list).
Fix half of bug 1956707 where speech rate value as read from the settings
was translated to a ratio, which applied an improper speech rate on the
TTS engine (bug was setting a default rate makes the TTS demo unintelligible).
Moved logic to set the default value in the language pref list in a separate
private method to improve readability.
Changed default rate values so that normal is 1x and the fastest is 2x.
example after checking that the data required by the TTS engine is
properly installed.
Removed use of local constants for the the default TTS values, use
the values defined in TextToSpeech.Engine instead.