Commit Graph

60 Commits

Author SHA1 Message Date
Josh Imbriani
1f248705eb Making changes to TTS pitch and rate also apply to work profiles
Bug: 132722565
Test: manual - used Lookback in work profile after changing personal
pitch and rate

Change-Id: Iffadbbf3cfe336cdcfac181d211015bd76079449
2019-06-20 15:02:25 -07:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
tmfang
8ad18fb3eb Use SettingsLib's ActionButtonsPreference
Since we moved old ActionButtonPreference into
SettingsLib, we need to update new imports and
declaration in Settings source code.

Test: robotest, manual test
Bug: 120005054
Change-Id: I1e3514ba68a856071c81534d54c99c3d1a11a8ca
2018-12-03 15:12:41 +00:00
tmfang
5c7f4de999 Remove setButtonPositive method
Since new UI design only exist two button in layout,
we don't need these methods anymore.

Test: robotest
Bug: 116346008
Change-Id: If2e8f7dddb9c13e480438f36fe3c5d6affa4e9ff
2018-11-16 14:33:16 +08:00
Rakesh Iyer
f4627bb608 Disable controls during playback.
The controls were enabled during playback earlier,
however changing them did nothing to the current
playout. Disable them during playout and re-enable
them once playout is done.

Bug: 77976922
Test: Repro case in linked bug.
Change-Id: I0fbe1c97e794fccc49172ee7542018aeef956c8f
2018-11-02 12:34:52 -07:00
Rakesh Iyer
52fd31c2f3 Misc fixes to TTS settings.
1. Remove an extra PreferenceGroup that was causing some spacing
   issues.
2. Remove the animations when elements resize because this causes
   items to slide around unnecessarily.
3. While we're in the file, lambda-ify some of the older code.

Bug: 77981482
Bug: 79897262
Test: Manually verified.
Change-Id: I9c79beea3a231ba62aeef3543802faebd775e128
2018-10-29 10:20:28 -07:00
Fan Zhang
9ce4a1fcde Use searchable="false" to suppress nonIndexables.
When possible, remove or simplify getNonIndexable() logic in fragments,
and use searchable="false" in xml to suppress index.

Change-Id: I5bdf5bc7d5494a64cdd9e230a51321a4b210af69
Fixes: 112608186
Test: robotest and manual search
2018-08-17 09:21:05 -07:00
tmfang
41ab6b4bf8 Migrate all AlertDialogs to AndroidX version
This CL only changed AlertDialog imports.
So, reviewer can review it easily.

Change-Id: I097bc44394195b14287f4f920c570ac8653f356a
Fixes: 111413092
Test: This CL can't pass Robo test.
2018-07-20 11:32:13 +08:00
Fan Zhang
78ea7da54c Misc tweaks to Indexable usage and tests.
- Make SettingsPreferenceFragment implement Indexable directly
- Add existing fragments that are SettingsPrefFragment but not Indexable
  to grandfather list.
- Fix "font size" fragment so it shows up in search properly.
- Remove duplicates for "lock screen display", "Screen saver".

Bug: 70720645
Test: robotests
Change-Id: I44ce0cac0fdf5e882b315861bb4bebc45dbe01e6
2018-07-02 16:46:23 -07:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Tony Mantler
0fcd6cbaa8 Autogenerate SearchIndexableResources subclass
Bug: 77148954
Test: RunSettingsLibRoboTests RunSettingsRoboTests RunSettingsGoogleRoboTests RunArcSettingsRoboTests
Change-Id: I842c42c55014c3310070ef22bd4f0d9a70dfd804
2018-04-03 10:26:55 -07:00
tiansiming
c27b072724 Merge "Fix NPE when press ttsEngines settings icon" am: 4b6e1b0758 am: 57b9039750
am: 576e159641

Change-Id: I475b444fffea5a45532144bc85b7464979fa7a0d
2017-12-15 22:41:34 +00:00
tiansiming
b65c4c3e25 Fix NPE when press ttsEngines settings icon
settingsIntent is obtained by method getSettingsIntent in
TtsEngines.java, and it has the chance to return null directly in
which case will lead to NPE crash when we startActivity in
TextToSpeechSettings.java with a null intent.
So, a judgement here makes sense.

Bug:https://issuetracker.google.com/issues/70266990
Test:
1) Install the apk "partner-BaiduSpeechService.apk" offered in the Bug link above.
2) Go to Settings -> Languages & input -> Advance -> Text-to-speech output
3) Choose "Duer voice engine 3.0" as the preferred engine
4) Press the settings icon in the right

Change-Id: I497a745ce62989f3ff1aee661648e90af25fb99e
Signed-off-by: tiansiming <tiansiming@xiaomi.com>
2017-12-07 10:08:34 +08:00
Fan Zhang
18a168239e Index TTS-Settings and dedupe TTS-engine in search result.
Fixes: 63022866
Test: robotests
Change-Id: I5c711e7bafba4e413ee271768c58742be05d8640
2017-08-16 15:46:41 -07:00
Fan Zhang
1105a1a465 Convert more pages to use ActionButtonPreference
- text to speech page
- blue tooth detail page
- installed app page

Change-Id: Ib743a144cc6025055cd496ec077f13fce4db0c69
Bug: 63991885
Test: robotests
2017-08-01 14:27:42 -07:00
Fan Zhang
cbfe1eb881 Add title to SeekbarPreference content description.
Adding a title to contentDesciption of the seekbar.
The title is helpful to indicate which seekbar user is changing when
talkback is enabled.

Also move SeekBarPreference from root package to widget packge.

Change-Id: I793f41c4902e350b6bc6d62761362779cc3722a9
Fix: 35421942
Test: make RunSettingsRoboTests
2017-05-16 12:35:45 -07:00
Niels Egberts
4b89142256 Save instance to avoid crash opon restore in onCreate.
Bug: 37110223
Test: mmma packages/apps/Settings
Change-Id: I82457880bf310efbb7e999a5776858e47b0660c9
2017-04-12 10:42:01 +01:00
Niels Egberts
46f38575ec New iteration of the Text-to-Speech settings.
- Moves speech rate and pitch back to first page.
- Voice selection is now expected to happen in Engine settings
- Play/reset buttons are now actual buttons.

Test: mmma packages/apps/Settings
Change-Id: I917298473ec473e11eccededee1cb948b0afe911
2017-03-21 12:06:34 +00:00
Niels Egberts
e5017dc6db Move settings to their new location according to ux spec.
This change doesn't add or remove any functionality.

Additionally, make the settings searchable.

Test: mmma packages/apps/Settings + manual testing

Change-Id: Id3e24fd52b49b7373b4f247241cc52f61ffe169e
2017-01-25 18:30:06 +00:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
shwetachahar
d6fb2cd724 Set the minimum speech rate to a value of ten instead of zero.
Bug: 27093805
Change-Id: I090a9345c3b05937d1f790ea051945ac187ddb61
2016-04-18 16:39:53 +01:00
Shweta Chahar
da4ecea845 Merge "Add a button to reset pitch to default value." into nyc-dev 2016-04-18 15:14:24 +00:00
shwetachahar
87f3e11da1 Replace the try catch block for retrieving pitch and speech rate
values from secure settings with getInt() supplied with a default
arg.
Also, set the pitch and speech rate of the TTS engine to the
default rate and pitch when initSetting() is called.

Bug: 27916665
Bug: 27871182
Change-Id: Ie772ee6f29d40774f70e73fe091f6f884472e2f8
2016-04-15 16:48:17 +01:00
shwetachahar
aaf9df3b19 Add a button to reset pitch to default value.
Bug: 27949093
Change-Id: Ia7fd2f824b8e87c08f9e2f3defca6e645c5c1bfb
2016-04-15 15:56:13 +01:00
shwetachahar
b804b8ee1b Modify the pitch seekbar range to 25 to 400 in accordance with the pitch
range accepted by the Google Text-to-Speech engine.

Bug: 27871182
Change-Id: Ic6afde8fe6738f9313242beda12bbe4ba14e98bb

	modified:   src/com/android/settings/tts/TextToSpeechSettings.java

	modified:   src/com/android/settings/tts/TextToSpeechSettings.java
2016-04-07 12:26:01 +01:00
shwetachahar
4ac718b7b5 Add a pitch seekbar for TTS speech output.
Bug: 27137452
Change-Id: I0992333822b4b1cd561dfa2501e47270ff4964b9
2016-03-09 18:20:19 +00:00
shwetachahar
6426435b4c Set the layout of seekbar as the preference_iconless_slider
and remove the higher speech rate preference variables.
The layout is changed to preference_iconless_slider so that the speech
rate slider layout is same as the layout of seekbars in android
settings.

Bug: 27136737
Change-Id: Ib75b8dec74ef07be87130a3f29249b148f4bcf0b
2016-02-26 15:09:52 +00:00
shwetachahar
bc170fd680 Add a reset speech rate button to Text-to-Speech settings UI
which resets the speech rate to 1x.
Bug Id: 27166001

Change-Id: Ie5b923e51de645e23ef0ba5d756c271070f11984
2016-02-12 22:44:52 +00:00
shwetachahar
5433496186 Remove 'Higher speech rate' button based on the results of the speech
rate slider a11y UX study.

Also, group speech rate, sample sentence synthesis and default language
status into a single preference category as they all fall under the
general TTS settings category.

Bug: 24527715
Change-Id: If7253e2e8a468393afcb4c24f5a775cb9af79db9
2016-02-11 14:58:09 +00:00
shwetachahar
8bd2feb9ec Add a seekbar to change text-to-speech rate and a switch to enable
higher speech rates.

Change-Id: I75cfc2af4e293dc45c93a44e5c2af73d1dae9b7c
2016-01-27 23:52:11 +00:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
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