Commit Graph

6 Commits

Author SHA1 Message Date
menghanli
e57125650d Unify the caption preference class naming
Bug: 197695932
Test: make RunSettingsRoboTests
Change-Id: Ice244442ad21e6d9f006d488992e9f58cf5c8fb0
2022-08-02 10:25:15 +08:00
menghanli
b9194c4eb8 Minor change for CaptionAppearanceFragment
1. Move unnecessary public variables into local variables
2. Use %s to update locale preference summary
3. Correct the test case name of CaptionPreviewPreferenceControllerTest

Bug: 197695932
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.accessibility
Change-Id: I58d4d590b9b6d46c27d389217f846a780d755891
2022-07-29 14:33:43 +08: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
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