Commit Graph

25 Commits

Author SHA1 Message Date
John Spurlock
9a23adf69d Settings: Remove all unused imports.
Change-Id: Iebfa52cb849d69974c94902b0b020893cf5618a3
2015-03-18 15:51:15 -04:00
Craig Mautner
5a98d43681 Take TextToSpeechSettings out of endless loop
Launching an Activity using startActivityForResult() every time
you are in onResume() is a recipe for endless looping. I.e. every
time the launched Activity finishes it will be relaunched because
the launching Activity reenters onResume().

This change keeps the GetSampleText activity from being launched
from onResume if we already have the sample text and the Locale
hasn't changed since the last onResume.

Fixes bug 15951054.

Change-Id: I65d9070df93396d8d3a45a6673ae56826f418122
2014-06-28 14:32:08 -07:00
Przemyslaw Szczepaniak
6ac8ddb898 Normalize TTS default locale before #toDisplayString
TTS is... special in regard of Locale instances it uses.
Recently ISO-3166 alpha 3 country codes went out of spec, so
"English (GBR)".

Bug: 15741357
Change-Id: I022105acad9d319d5e09231be340405d797c84c4
2014-06-19 15:50:50 +00:00
Alan Viverette
2c461006b8 am 6bfec2d6: Remove all dialog icons in Settings
* commit '6bfec2d6b197068dd355bd1742179fe3da07136f':
  Remove all dialog icons in Settings
2014-06-11 13:07:58 +00:00
Alan Viverette
6bfec2d6b1 Remove all dialog icons in Settings
BUG: 15474733
Change-Id: I43ab10a3bbcabdac6109abf80266f1c4b52bf6fb
2014-06-10 13:41:07 -07:00
Przemyslaw Szczepaniak
3b60858e9c Make TTS "Listen to an example" survive rotation.
Bug: 15019145

Change-Id: Id94e32947c58911ded3e4025653b415453cabbbb
2014-05-28 17:04:08 +01:00
Przemyslaw Szczepaniak
cc91f6ff66 am 7a5911a9: am 375545e2: am 6829c48c: Merge "Fix F/C in TTS settings"
* commit '7a5911a96d158567bac1e892aee813af1b563a46':
  Fix F/C in TTS settings
2014-03-13 23:12:10 +00:00
Shuhrat Dehkanov
f365216391 Fix F/C in TTS settings
This is an attempt to fix uncaught MissingResourceException
that would be thrown if default language of selected engine is
set to a locale that has no 3-letter country/language code.

Please see https://code.google.com/p/android/issues/detail?id=63122

Change-Id: Iccb2a55f5f7a97819310fd888559650fe7febe4a
Signed-off-by: Shuhrat Dehkanov <k@efir.uz>
2014-03-13 12:06:17 +09:00
Fabrice Di Meglio
263bcc8b73 Use Drawer in Settings app
- get rid of PreferenceActivity as much as we can and use fragments instead
- add Drawer widget
- add Dashboard high level entry into the Drawer (but this is work in progress and would be done in another CL)
- add bypass of fragment's Header  validation when launched from the Drawer but *force* validation if external
call thru an Intent

Be aware that WifiPickerActivity should remain for now a PreferenceActivity. It is used by SetupWizard and should
not trigger running the SettingsActivity's header building code. SetupWizard is a Home during the provisionnig process
and then deactivate itself as a Home but would make the Home header to appear in the Drawer (because momentarily we
would have two Home).

Also, verified that:

- the WiFi settings still work when called from SetupWizard
- when you have multiple Launchers, the Home header will appear in the list of Headers in the Drawer

Change-Id: I407a5e0fdd843ad7615d3d511c416a44e3d97c90
2014-02-03 16:36:46 -08:00
Przemyslaw Szczepaniak
eb306b4c15 Fix for empty "Listen to an example" string.
Because of bug in previous TTS related change (bugfix for hiding
"Play TTS sample" if default language is not supported), settings
stopped to call getSampleText() when it was established that current
default language is supported.

This change makes sure that getSampleText() is always called if language
is supported.

Bug: 10672535
Change-Id: I83bf7056e12ddbe2322b6a3f04552802037626aa
2013-09-10 10:35:57 +01:00
Przemyslaw Szczepaniak
80c2b9b0c4 Hide "Play TTS sample" when locale is not settable as default
Due to a bug, it's possible for settings to show status telling
that locale is available, despite locale not being in list of
locales settable as TTS default locale. This change fixes it.

Bug: 10630713
Change-Id: I21f8487fc6c1ea7812aeffbc26dfa5fc0a8afa3b
2013-09-05 13:05:04 +01:00
Przemyslaw Szczepaniak
0e01f128ab Fix for TTS settings crash.
Play an example is wrongly enabled before TTS engine is initialized.

Bug: 10288565
Change-Id: I9204d8dda7f8de5c67aba2bb73b25589eeac5cef
2013-08-13 13:05:48 +01:00
Przemyslaw Szczepaniak
6ada2d5547 State that TTS language is not supported if not in available list.
Bad TTS implementation of isLanguageAvailable may cause settings to
think that given language is available. This change adds additional
check, by searching locale in list of available locales returned
form TTS CheckVoiceData activity.

Bug: 9982002
Change-Id: Ic91cd1218349b8241e3f40f2343df52f3d900544
2013-08-06 13:55:52 +01:00
Przemyslaw Szczepaniak
4c85c1d6f4 Disable TTS "Listen to the example" if not supported
If current TTS locale (most of the cases same as device locale) is
not supported by the TTS engine, field for setting synthesis speed
and "Listen to the example" will be disabled.

Added new field, "Default language status" to indicate level of support
for currently selected language. It can take one of three messages:
%s is fully supported
%s requires network connection
%s is not supported
Where %s is locale display name.

Added example string that will provide a fallback for example text
if not provided by Settings or TTS engine.

Change-Id: Ia2a920a71197a85d3812fc8df9dfed4ebe6b515f
Bug: 9982002
2013-08-05 10:55:07 +01:00
Przemyslaw Szczepaniak
a7d2c93c2b Fix for setting app not playing tts sample.
Bug: 7666482
Change-Id: I36a775312d62d3d7a5ee600b540a328b377b46c9
2012-12-14 07:26:39 -08:00
Przemyslaw Szczepaniak
820dc4c910 Fix radio buttons when user cancel TTS engine change
When user decides to change tts engine, and if it's not system one,
then he sees dialog warning about possibility of sending all kinds of
data to the engine.

If user chooses to not changes engine, radio button still sticks to the
new position.

This change delays all operations regarding changing current engine
after user closes dialog. It also unsets the radio button if user chooses
to cancel it.

Bug: 7628362
Change-Id: I977abe71b3547f2545a971fc0d69179be6fafb44
2012-11-30 04:48:58 -08:00
Przemyslaw Szczepaniak
03b9f86722 Alert for using network-only-tts with no network.
If TTS requires network for selected language, we will
show dialog informing why we can't synthesize an example
if user have no internet connectivity.

Bug: 7398316
Change-Id: I01b033a9a8b8538b322ed3639b671f90f849ae29
2012-10-29 04:48:38 -07:00
Jean-Baptiste Queru
9e8e9a1783 am 6fb425e2: am eefa61ed: Merge "Settings: Use ICS alert drawable"
* commit '6fb425e2805a1c27c048fc954d402f4612cbf74d':
  Settings: Use ICS alert drawable
2012-08-13 16:03:15 -07:00
Jean-Baptiste Queru
eefa61ed2e Merge "Settings: Use ICS alert drawable" 2012-08-13 11:53:46 -07:00
Przemyslaw Szczepaniak
923187a159 Keep speech rate dialog after rotate
It also adds some missing @Override

Bug: 5997716
Change-Id: I33a7b8ad16cd067af960a4808ae6003dde1d7693
2012-08-10 07:13:52 -07:00
Björn Lundén
e7c53b1c9e Settings: Use ICS alert drawable
Point to the correct holo alert drawable.

Change-Id: Ia15aaa028c8371cb2478baeecd2da31520c43a5d
2012-05-31 23:35:24 +02:00
Narayan Kamath
5a38df2648 Call setLanguage() when the TTS locale is changed in settings.
This is required to fix the case where an app has instantiated
and is using a TextToSpeech instance, and the user switches to
settings and changes the language for that instance. If no
app was using TTS, then onCreate() would have be called when
TTS is used next, and the correct locale will be loaded.

bug:5823836
Change-Id: I62adf3f7f0f14b67450ba08b8743e0d31e615a7e
2012-01-05 15:14:04 +00:00
Narayan Kamath
52b2745e85 Remove some unnecessary setLanguage() calls.
This prevents QUEUE_FLUSH from working as intented since
there is a (blocking) setLanguage() call that waits for
the previous synthesis to complete before flushing the queue.

bug:5288327
Change-Id: I00467f0ac1584863ae27bfc076b8413e29e5379b
2011-09-13 14:38:20 +01:00
Narayan Kamath
8c3663bbd7 Call setLanguage( ) on the TTS engine before the sample.
This makes the sample play faster, and results in a reliable
return value from getLanguage().

bug:5207139
Change-Id: Ic6ca4a2f4aed299d35c320ecc3f327579c66471b
2011-08-24 20:33:01 +01:00
Narayan Kamath
0cfbb0f10a Implement the new TTS settings UI.
bug:5149036

Change-Id: I81a9786d20be3e9bf87550d6a0cc04191409600c
2011-08-23 18:10:01 +01:00