Commit Graph

1280 Commits

Author SHA1 Message Date
menghanli
0e7f366ffa Refactor CaptionAppearanceFragment to improve maintainability (5/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 custom perference visiblity 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: I53d4ca3809031587f8d6853b427774fd322a71d8
2022-07-26 12:25:56 +08:00
PETER LIANG
e000f54431 Merge "Fix the inconsistent alignment of the main switch preference." into tm-qpr-dev am: aea8f1aeb2 am: 26c3c3a95c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19358210

Change-Id: Iaa9faf78d8fd4813e9725f246745744e98d0c325
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-25 12:44:12 +00:00
Menghan Li
0f6f22225c Merge changes I5409c1e8,I8ed80b44
* changes:
  Refactor CaptionAppearanceFragment to improve maintainability (4/n)
  Refactor CaptionAppearanceFragment to improve maintainability (3/n)
2022-07-25 08:42:40 +00:00
menghanli
5356e0c0a9 Refactor CaptionAppearanceFragment to improve maintainability (4/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 preset preference logic of CaptionAppearanceFragment into controllers to reduce the complexity of the relationship between preference and fragment.

Bug: 197695932
Test: make RunSettingsRoboTests ROBOTEST_FILTER=CaptionPresetControllerTest CaptionAppearanceFragmentTest
Change-Id: I5409c1e8a6bdfc633abc304d8cf800ea0943de78
2022-07-25 12:26:27 +08:00
menghanli
16fbfe4e14 Refactor CaptionAppearanceFragment to improve maintainability (3/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 color and edge 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: I8ed80b445a0d376a7e9dda87feda82420a78a9da
2022-07-25 09:18:11 +08:00
menghanli
755d691183 Refine AccessibilityGestureNavigationTutorial button type
Root cause: It is weird to display positive text for the negative button.
Solution: Change to the positive button.

Bug: 216189516
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityGestureNavigationTutorialTest
Change-Id: I8ffc6b7b5b510fab159a23af83bca4426f2dc81d
2022-07-25 08:40:24 +08:00
menghanli
33dda10ae7 Remove obsoleted code: AccessibilityGestureNavigationTutorial
Don't show the button tutorial when changing into sysem button navigation

Bug: 197695932
Test: make RunSettingsRoboTest
Change-Id: Ied90a602cd3228ee6f36b4b50fb1c019429a271e
2022-07-22 15:38:09 +08:00
Peter_Liang
e1c4901ce8 Fix the inconsistent alignment of the main switch preference.
Remove the redundant function.

Bug: 232494666
Test: manual test
Change-Id: I1827d39b194048452b71c680e2bbf94e43bfcac5
2022-07-21 00:56:07 +08:00
menghanli
236a376211 Refactor AccessibilityControlTimeoutPreferenceFragment to improve maintainability
Root cause: There is a bunch of different logic of preferences in AccessibilityControlTimeoutPreferenceFragment. It’s hard to implement new features and hard to maintain and hard to be testable.
Solution: Move out logic of AccessibilityControlTimeoutPreferenceFragment 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: I22e6e3b9e2f199ac1721fc069690321ad5f7a0d4
2022-07-18 15:50:52 +08:00
menghanli
3a591f9a34 Refactor CaptionAppearanceFragment to improve maintainability (2/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 font size and type face 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: Ia52cd272495d49a772c981f51e190ff7d29ee14f
2022-07-15 06:55:54 +08:00
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