Commit Graph

106 Commits

Author SHA1 Message Date
Tsung-Mao Fang
70b8bd92c9 Fix NPE crash in TextToSpeechSettings
Recyclerview's getItemAnimator() is nullable so we need a null check.

Bug: 254330134
Test: Manual
Change-Id: Iba5b0d68740c430fd1143d38ccf344afef486784
Merged-In: fa6a8e9767
2022-11-07 05:43:40 +00:00
Edgar Wang
cdff5c6ceb Revert "Apply SettingsLib SeekBarPreference to Settings"
Revert submission 13422386-seekbar-sc-dev

Reason for revert: build broken in SettingsGoogle
Reverted Changes:
I0c2d0d5fb:Apply SettingsLib SeekBarPreference to SettingsGoo...
I1844bb3b0:Apply SettingsLib SeekBarPreference to a11y vibrat...
Ia3e4adec8:Apply SettingsLib SeekBarPreference to a11y vibrat...
Iadee57e9d:Apply SettingsLib SeekBarPreference to a11y vibrat...
I219878716:Apply SettingsLib SeekBarPreference to Settings
I959f5672c:Create SettingsLibSeekBarPreference
I92545a69c:Apply SettingsLib SeekBarPreference to a11y vibrat...

Change-Id: Ie6c3b0dc072e044796abdb33fca305f9f9d47c4d
Bug: 176818438
2021-06-08 09:47:51 +00:00
Edgar Wang
d6b5bbb5cb Apply SettingsLib SeekBarPreference to Settings
Bug: 176818438
Test: robotest

Change-Id: I219878716457ce4bb7cad251bccf5d50d93030a5
2021-06-07 18:09:19 +00:00
Treehugger Robot
818c5396ce Merge "Update OWNER file for TTS subfolder" am: a1cf8135e6 am: ba40979005 am: 7609a76fe7
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1674685

Change-Id: I1c35d4082fe02fba39bb812257b2c5ad5859c31e
2021-04-20 03:33:39 +00:00
Tsung-Mao Fang
b6b63bec6c Update OWNER file for TTS subfolder
Change-Id: If0efd5051bc8ddcaa406746d4eb4e4a03d9023b7
Test: N/A
Fix: 185232773
2021-04-14 01:29:15 +00:00
John Li
f37b85e709 Add haptic effect for the seekbar in Settings 5/n.
- for Speed rate/Pitch in Text-to-speech output, perform haptic feedback as the seekbar's progress value is the min/max value.
- screenshot, https://screenshot.googleplex.com/49fuUji43N2dz2W

Bug: 174109628
Test: manual
Change-Id: I097950596b78179ec09feccd59dc5ee1b77afc6e
2020-12-01 01:18:07 +00:00
Edgar Wang
329b20a445 Add metrics log for special cases in Lanugages & About page
Bug: 137559984
Test: robotest

Change-Id: I007282d8c4d5f9c6168dd84f6feee7e237ec7c42
2020-04-30 17:19:52 +08:00
Josh Imbriani
e77e22e208 Fixing TTS Settings crash on rotation caused by using deprecated API.
Test: manual - rotated phone while playing TTS
Fix: 145579714

Change-Id: I7232704c92ba8ec34769cf68afe2278e22532d86
2020-02-10 09:00:11 -08:00
Raff Tsai
966fa01423 Use SettingsLib Indexable
- Use SettingsLib Indexable
- Directly use resource id in getPreferenceScreenResId

Bug: 135053028
Test: roboletric
Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
2019-09-25 18:24:56 +08:00
Raff Tsai
ac3e0d0988 Directly use BaseIndexableProvider
- Add function getXmlResourceId, Fragments don't need to write
xml resource id twice.
- Remove getPreferenceControllers from Indexable.java. Because it will
move to SettingsLib later for other apps which don't need this function

Bug: 135053028
Test: robolectric
Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
2019-09-24 00:35:52 +08:00
Raff Tsai
1f30b1cd67 Merge similar BaseSearchIndexProvider code together
Bug: 135053028
Test: robolectric, check search_index.db contains the same items
Change-Id: If3c18a170b0e671690df1fdf26e59a421d2c48cd
2019-09-12 11:09:09 +08:00
Joshua Imbriani
3a117e6771 Merge "Correcting sort order of languages for non en-us locales" 2019-07-11 20:28:21 +00:00
Josh Imbriani
7d6263a38d Correcting sort order of languages for non en-us locales
Test: Manually tested
Fixes: b/78125395
Change-Id: I1b370d4ae4995cc7d9f05409be97d4ecf9104241
2019-07-11 15:17:28 +00:00
Joshua Imbriani
5d00bdbdc5 Merge "Making changes to TTS pitch and rate also apply to work profiles" 2019-06-26 15:23:32 +00:00
Raff Tsai
a9fc062fd1 Fix cannot switch between multiple TTS engines
- We didn't reset reset radio button state when user click back
while dialog was popped. Change the UI, when user really accepts the
dialog content, then changes radio button state.
- Migrate TtsEnginePreferenceFragment to RadioButtonPickerFragment

Fixes: 135588938
Test: manual
Change-Id: Ia824e08d59c77a23e6590ff0f5b7d897a73a1ff8
2019-06-25 16:46:31 +08:00
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
Raff Tsai
39c6a16aba Cannot switch between multiple TTS engines
That is caused by layout xml changes. The radio button was clickable
in old xml resource. But it is not clickable in new xml resource.
Therefore we can't receive click callback. Fixed by changing
Radio button state when preference is clicked.

Fixes: 135285101
Test: manual, make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.tts"
Change-Id: Idd7bf37d9ccbc1b56d41978d19dc05c8a81cc49a
2019-06-19 16:35:35 +08:00
Fan Zhang
5bb4ef7c45 Clean up tts preference layout.
Deleted the custom tts layout and use preference_radio directly.

Fixes: 129994473
Test: visual
Change-Id: Ifc50e0cf9f805776e0529ffd5d672283f28a1d15
2019-04-05 13:44:37 -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
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00: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
jackqdyulei
d6a00cfa3f Add owners to setting packages.
Bug: 65294119
Fixes: 69384604
Test: Build

Change-Id: Ib4fddc1f04087671d8445fd967d4262287e5c4f3
Merged-In: I927052a73f639d0894600611cd5c79293f43ff5e
Merged-In: Ia1eb8155f2d4359d56b0babd474083295ba38a0b
Merged-In: I24ec103ff5013ad416e3dfb1c548acd387b4ba64
Merged-In: If9fddc8b4e2e6d4d7db185ab16063e824323b9a7
Merged-In: I49159950521a013422b1087ea2c3e6cd5151457c
Merged-In: I69af58183c5b89af96c1a8808665fa506a620012
Merged-In: Ie9492f497824cd2b2727dde9d3a48452c72f1084
Merged-In: I2fd0249fd8b555e5ca93c3aec13857e6c74e157c
Merged-In: Id1c2d9233643a18c1e104255a9e2b8b1aaefc44e
Merged-In: Icdcfaaf6cc7a1e1cf77e89a79d0425cab4405ffc
Merged-In: I697528ff260a0f8e54aa1188e35143e668800e7d
Merged-In: I1486782f476acaf1e2e4b66df57869409239986f
Merged-In: I804b50a38c877da80b5ef3251e16029259014152
Merged-In: I39eec9ebc1db2dc14669f27b17624394e25eb47f
Merged-In: I054a6df08046cda1c2f202390ed24839a6b10349
Merged-In: I9da5bd71ed6aa3922a7f2e2ac4729e3247a204ce
Merged-In: I63778c68f1ab9edc36a9e12aa1729f8fd6a5e073
2017-11-20 16:39:59 -08:00
jackqdyulei
35066bbcd7 Add OWNERS for folder tts
Bug: 65294119
Test: Manual
Change-Id: Ie9492f497824cd2b2727dde9d3a48452c72f1084
2017-09-11 14:08:09 -07: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
43d93289ba Modify the TTS engine preference UI so that the radio button and the TTS
engine name are a single focusable element.

Bug: 27136946
Change-Id: I502634e0942b9fe30e290ce9de6ba293f33bf863
2016-05-17 13:56:57 +01: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