Before, the dialog asking whether to really enable
the engine wasn't shown. Also, the Default engine
list was not refreshed until you left the TTS settings
and came back.
Change-Id: I8cbded0fe9eedbfb05c294d831c91a857349b224
When initializing the TTS engine, the default speech rate is
correctly read, but the TTS demonstration in the Settings
screen was overriding that value by setting the rate to
its fixed default value after the engine was initialized.
The fix consists in applying the default value after it has
been read from the settings (as is done for the language
for instance).
Change-Id: Ie13dfa3a2a7e59e5e120e74dc41e60afbedea821
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.