Commit Graph

1120 Commits

Author SHA1 Message Date
menghanli
591e44bb99 Refactor CaptionAppearanceFragment to improve maintainability (1/n)
Root cause: There is a bunch of different logic of preferences in CaptionAppearanceFragment. It’s hard to implement new features and hard to maintain and hard to be testable.
Solution: Move out preview preference logic of CaptionAppearanceFragment into controllers to reduce the complexity of the relationship between preference and fragment.

Bug: 197695932
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.accessibility
Change-Id: Ie8acdcb8659606ce3faf6d5532cc73ee19024725
2022-07-14 16:55:08 +08:00
Jason Hsu
20f06012f6 Merge changes Ib9cb9b6d,I85209170
* changes:
  Change updatePreferenceOrder() to onCreateView()
  Migrate to DashboardFragment in ToggleFeaturePreferenceFragment
2022-07-13 04:32:22 +00:00
Menghan Li
ae9d768549 Merge "Add SearchIndexable to improve search coverage" 2022-07-12 22:52:12 +00:00
jasonwshsu
15c73a5f83 Change updatePreferenceOrder() to onCreateView()
Root Cause: change preferences' order in onViewCreated() will see the
order moving animation.

Solution:
* Move to onCreateView() can avoid seeing the order moving animation.
* Move onProcessArguments() to onCreate() to let it be called as early
  as possible. Also let it align the calling getArguments() behavior in
  parent class PreferenceFragmentCompat.

Bug: 171272809
Test: make RunSettingsRoboTests ROBOTEST_FILTLTER=ToggleFeaturePreferenceFragmentTest
Change-Id: Ib9cb9b6df232ddcb681683ac2fcd2c6406c7a487
2022-07-13 00:41:00 +08:00
jasonwshsu
8145631ab8 Migrate to DashboardFragment in ToggleFeaturePreferenceFragment
Root Cause: ToggleFeaturePrefreferenceFragment becomes heavy when more and more features come in.

Solution: Mirgrate to DashboardFragment, a plugin-style preference controllers, can help us separate the preference and its logic into its own controller.

* This is the first step for the whole migration. Change to extend DashboardFragment and fill up the missing override functions.
* Reorder fields and functions to the recommended general approach.

Bug: 171272809
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=com.android.settings.accessibility

Change-Id: I852091700a4b3b3c7bbdbc82f0b5dc47c087d61c
2022-07-13 00:40:55 +08:00
Menghan Li
c825a0bdc9 Merge "Remove obsoleted code: DividerAllowedBelowPreference" 2022-07-12 13:01:50 +00:00
menghanli
5209a10e9f Remove obsoleted code: DividerAllowedBelowPreference
Settings don't show divider in material design. The DividerAllowedBelowPreference is not used now.

Bug: 197695932
Test: make RunSettingsRoboTest
Change-Id: Id2b28f76c4ed8c429594bf786690499fb3f2503a
2022-07-12 11:28:11 +08:00
menghanli
ab6cbea3fd Remove obsoleted code: DividerSwitchPreference
Settings don't show divider in material design. The DividerSwitchPreference is not used now.

Bug: 197695932
Test: make RunSettingsRoboTest
Change-Id: I3fef9401b5c4a3e7d4ca6fc966f3e60c57558cdd
2022-07-12 11:23:55 +08:00
menghanli
6c85a215de Add SearchIndexable to improve search coverage
- Add searachIndex test
- Increase accessibility framework feature fragment coverage

Bug: 197695932
Test: make RunSettingsRoboTests
Change-Id: Icb7e2cf70bb0443304af7866efd48bed1d9af5bf
2022-07-12 10:51:59 +08:00
Menghan Li
67b6b5a020 Merge "Fix extra dim turns on failed in setting search bar" 2022-07-07 21:06:04 +00:00
menghanli
d95d799d86 Fix extra dim turns on failed in setting search bar
Root cause: Don't call displayPreference before setChecked called.
Solution: Don't show quick settings tooltips if preference is not ready.

Bug: 237850687
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityQuickSettingsPrimarySwitchPreferenceControllerTest
Change-Id: I52425190cce4ab3cf31be025a743bf8b212fa1f9
2022-07-07 09:04:53 +08:00
Peter_Liang
772e114438 Avoid the reset item having inconsistent alignment with the others under SuW.
Replaces the LayoutPreference with native Preference for the reset preference which is used for resettings the status of all preferences.

Bug: 232528123
Test: make RunSettingsRoboTests ROBOTEST_FILTER=TextReadingResetControllerTest,TextReadingResetPreferenceTest
Change-Id: I00719f13dc78039269ee373c6b35e12e7ff595ce
2022-07-05 15:32:37 +08:00
Menghan Li
9450735e38 Merge "Refactor CaptionPropertiesFragment to improve maintainability" 2022-06-30 03:48:33 +00:00
menghanli
1d26b6d898 Refactor CaptionPropertiesFragment to improve maintainability
Root cause: There is a bunch of different logic of preferences in CaptionPropertiesFragment. It’s hard to implement new features and hard to maintain and hard to be testable.
Solution: Move out different logic of CaptionPropertiesFragment into controllers to reduce the complexity of the relationship between preference and fragment.

Bug: 197695932
Test: make RunSettingsRoboTests ROBOTEST_FILTER=CaptionPropertiesFragmentTest CaptionTogglePreferenceControllerTest
Change-Id: I7013a7aa284b587c329c2e678dbb079e553ea94d
2022-06-30 09:01:13 +08:00
Menghan Li
5a3498c9bc Merge "Refactor CaptionMoreOptionsFragment to improve maintainability" 2022-06-30 00:16:54 +00:00
menghanli
deb72e29ef Refactor CaptionMoreOptionsFragment to improve maintainability
Root cause: There is a bunch of different logic of preferences in CaptionMoreOptionsFragment. It’s hard to implement new features and hard to maintain and hard to be testable.
Solution: Move out different logic of CaptionMoreOptionsFragment into controllers to reduce the complexity of the relationship between preference and fragment.

Bug: 197695932
Test: make RunSettingsRoboTests ROBOTEST_FILTER=CaptionMoreOptionsFragmentTest CaptionLocalePreferenceControllerTest
Change-Id: Ifdf3e22b027328a9f8eb13d756730ca047ece047
2022-06-30 00:16:19 +00:00
Angela Wang
b4e3cd1e77 Merge "Update source metric category of HearingAidDialogFragment and HearingAidPairingDialogFragment" 2022-06-29 11:38:17 +00:00
Angela Wang
c7e74fd8b6 Update source metric category of HearingAidDialogFragment and HearingAidPairingDialogFragment
Use different source metric categories to distinguish different launch sources of the BluetoothPairingDetail page.

Bug: 237344016
Test: manual
Change-Id: If762e87414055f3e497f99ea6885f7736b7193cd
2022-06-28 03:49:34 +00:00
menghanli
e862d44e15 Setup AccessibilitySettingsForSetupWizard test infrastructure
Bug: 197695932
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilitySettingsForSetupWizardTest
Change-Id: I9438f770bfe2ef5f03206fc4645e77bab6328cc6
2022-06-27 08:45:08 +08:00
Menghan Li
94f328040d Merge "Remove obsoleted code: VideoPlayer" 2022-06-10 06:31:05 +00:00
Menghan Li
2312cf96be Merge "Remove obsoleted code: VolumeShortcutToggleFragmentForSetupWizard" 2022-06-10 06:30:26 +00:00
menghanli
4cc19665ac Remove obsoleted code: VolumeShortcutToggleFragmentForSetupWizard
The ag/10232215 checks the APK target SDK to use corresponding fragment to avoid wrong status before these app release to R. The patch can dynamic change Select-To-Speak and Talkback on SUW Welcome Screen. Now, the preload select-To-Speak and Talkback uese SDK T. We can remove the obsoleted code.

Bug: 235458916
Test: make RunSettingsRoboTest
Change-Id: I1e7b9c12bf73a5edcaef8814f55df98b9baf9f5e
2022-06-09 20:21:04 +08:00
menghanli
77d5e1ec25 Remove obsoleted code: VideoPlayer
Use the LottieFiles to show illustrations for settings. The VideoPlayer is not used now.

Bug: 235454775
Test: make RunSettingsRoboTest
Change-Id: I008d399632763f60c1a4028cb50ef90d7687bd88
2022-06-09 12:09:17 +00:00
Chaohui Wang
a57a41c0db Merge "Clean up unused PreviewSeekBarPreferenceFragment" 2022-06-07 10:08:24 +00:00
menghanli
9c9a5e4c41 Setup ToggleDaltonizerPreferenceFragment test infrastructure
Bug: 229831598
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ToggleDaltonizerPreferenceFragmentTest
Change-Id: I157a8aa63bcb6fc816b51957bd64425e710c438d
2022-06-07 08:59:20 +08:00
Chaohui Wang
f3f39dadc9 Clean up unused PreviewSeekBarPreferenceFragment
Usage is removed in Change: I5d8027628dcf06d99274a6a7a781218d146519eb

And we can clean up its subclasses and resources also.

Bug: 234570979
Test: m Settings
Change-Id: I4a24a34e814401749894a85375a05691b537f5a3
2022-06-05 16:52:20 +08:00
PETER LIANG
384bc85ecf Merge "Fix the preview section incorrectly ordered of the display size and text." 2022-06-01 15:34:07 +00:00
Peter_Liang
4b13620457 Fix the preview section incorrectly ordered of the display size and text.
Goals: Set correct order into.

Fix: 233924113
Test: manual test
Change-Id: I88c65aa9c3f05281a5c5090c2ca9503327bb580f
2022-06-01 08:17:56 +00:00
Sally Yuen
2de32a631f Merge "Set a pane title on the some a11y windows' root views" 2022-05-25 16:06:15 +00:00
Angela Wang
35387d3d4c Merge "Add a button to the accessibility button tutorial dialog that links directly to the settings page." 2022-05-23 07:00:33 +00:00
Edgar Wang
8691006c5c Merge "Update learn more string of FooterPrefernce" into tm-dev am: 24654a3d61 am: eaa0a1cf5c am: 21ddf79998 am: b9a06a9f34
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18356903

Change-Id: I74b97b4b7d7a009af0dd20fe9f1a24717fffd3f3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-21 00:28:03 +00:00
Edgar Wang
24654a3d61 Merge "Update learn more string of FooterPrefernce" into tm-dev 2022-05-20 23:13:07 +00:00
Angela Wang
57d13ad018 Add a button to the accessibility button tutorial dialog that links directly to the settings page.
When the accessibility button appears, some users don't know how to
control it. Add a button to the tutorial dialog that links directly to
the settings page to help users get more information.

Bug: 183977141
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityGestureNavigationTutorialTest
Change-Id: I08d7e5b0771b6bf99f7753ccbcf2e7400227ddc5
2022-05-20 05:31:55 +00:00
Sally
301d621608 Set a pane title on the some a11y windows' root views
This allows a service to identify a window based on the title.
Configuration changes will restart the activity, losing a11y focus.
A11y focus may be retained by matching windows and unique ids. This
CL allows matching by window/pane title.

Test: manual
Bug: 175182916
Bug: 175184180
Change-Id: Iae4627795c2a35e57b651d9e7ce7527a0ddb1353
2022-05-17 17:36:21 -07:00
Jason Hsu
0564c9f88c Merge "Pop up pairing another ear dialog when detecting hearing aid is a set" into tm-dev am: 13438e6084 am: fd94f4b0be
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17291804

Change-Id: I024d5608df72e29c54092ebc69289baa6f3e8152
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-15 10:18:51 +00:00
jasonwshsu
acd3f94fde Pop up pairing another ear dialog when detecting hearing aid is a set
* Pop up dialog in 'Connected deivce' page and 'Accessibility -> Hearing
  aids' page

Bug: 225117454
Bug: 226511985
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidPairingDialogFragmentTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableMediaDeviceGroupControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityHearingAidPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidUtils

Change-Id: I34a1e3ac680a7efe97dc501bfbe93f840ad16364
2022-05-14 22:16:22 +00:00
jasonwshsu
d0125849ff Update summary in Accessibility -> Hearing aids am: 82d3bb2b73 am: 5df43f61d1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17298123

Change-Id: I79aabfa8015f019604b02b37a4d7a1d30d9d3535
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-14 01:14:06 +00:00
jasonwshsu
5df43f61d1 Update summary in Accessibility -> Hearing aids am: 82d3bb2b73
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17298123

Change-Id: If31b7485992c192a4afebd85d30355f811b33fce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-14 00:57:44 +00:00
Jason Hsu
c3bbb709b9 Merge changes from topic "hearingAidsInT" into tm-dev
* changes:
  Add 'Live Caption' preference for hearing aids device in Device details page
  Update summary in Accessibility -> Hearing aids
  Header for hearing aids now listed in one summary
2022-05-14 00:24:44 +00:00
jasonwshsu
82d3bb2b73 Update summary in Accessibility -> Hearing aids
Bug: 225117843
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityHearingAidPreferenceControllerTest
Change-Id: I19c08474349e9ae98cd3f296ba8423f920d55fcf
2022-05-14 02:06:45 +08:00
PETER LIANG
3081e4d869 Merge "Updates the padding of the reset button to meet for SetupWizard style." into tm-dev am: fc481ece26 am: 411bcd1c43
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18349802

Change-Id: I2a3f032e01c55be88fdac31a1d671f43edfcd438
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 12:53:43 +00:00
PETER LIANG
f277c9df40 Merge "Fix that once the phone is rotated to portrait orientation, the "Use TalkBack" toggle is truncated." into tm-dev am: ae1d7d3ef4 am: 50bc59a572
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18356908

Change-Id: Iba3e4b7cea8290da38ed7b3b85edc6595f22bb3d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 12:53:33 +00:00
PETER LIANG
fc481ece26 Merge "Updates the padding of the reset button to meet for SetupWizard style." into tm-dev 2022-05-13 12:01:18 +00:00
PETER LIANG
ae1d7d3ef4 Merge "Fix that once the phone is rotated to portrait orientation, the "Use TalkBack" toggle is truncated." into tm-dev 2022-05-13 12:00:58 +00:00
Peter_Liang
f659095c07 Fix that once the phone is rotated to portrait orientation, the "Use TalkBack" toggle is truncated.
Goals:
1. Extends the api of apply partner's customization padding style in the Settings widget "SettingsMainSwitchPreference" to dynamically adjust the padding depending on the SetupWizard library.
2. Use the function to avoid the button being truncated.

Bug: 231512916
Test: manual test
Change-Id: I951776185eb1616136d9caf3a60f9daea4da191a
2022-05-13 08:44:18 +00:00
Edgar Wang
68d12953e7 Update learn more string of FooterPrefernce
Replace FooterPreference#SetLearnMoreContentDescription() with
FooterPreference#SetLearnMoreText().

This is a requirement: All links, controls, and buttons should
also have comprehensible text or tooltip text, so users can identify its
purpose, independent of context, such as when using the URL list from
TalkBack’s local context menu.

Bug: 215045903
Test: manual & robotest
Change-Id: Ib657ba336c5688c1434a58611dea3891001afe14
2022-05-13 08:13:36 +00:00
Peter_Liang
5bdc11a00d Updates the padding of the reset button to meet for SetupWizard style.
Goals: Call the function LayoutStyler#applyPartnerCustomizationLayoutPaddingStyle to dynamically adjust the padding of the view.

Bug: 231511522
Test: manual test
Change-Id: Idd4a00c004eca8ec9699edeabe85bbee4bd49af9
2022-05-13 09:37:13 +08:00
PETER LIANG
45634511a4 Merge "Fine-tune the location of the logging for accessibility text and reading options." into tm-dev am: a571dd9973 am: 3f7265aec8 am: a47c16bcb2 am: 0131c26979
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18319147

Change-Id: I3ed17a1478ab17b24f457d0f3bc1947546475e21
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 18:28:52 +00:00
PETER LIANG
a571dd9973 Merge "Fine-tune the location of the logging for accessibility text and reading options." into tm-dev 2022-05-12 16:14:37 +00:00
Jason Hsu
dfcdc1c0d4 Merge "Correct Magnification shortcut title in edit shortcut dialog" into tm-dev am: 76ae78452d am: 02c981cf72
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18332039

Change-Id: I8f0d6fd15823d7235b651b11f2e6ae8b2fcafe6b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 14:00:13 +00:00