"Yes" and "no" were redefined many times with no clear benefit, so this
consolidates them into one definition.
Bug: 243843096
Test: Build, install, and open the Settings app
Test: atest SettingsRoboTests
Change-Id: I5f84d09f223efd478461ded93aeac82bf7b128d8
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
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
Root Cause: Magnification has its own edit shortcut dialog, but we did not
update correct title with getShortcutTitle()
Solution: set dialog title to getShortcutTitle()
Bug: 231531313
Test: manual test
Change-Id: I0679be2807a4b1f8b8a733604e16a35b0a1258c3
Root Cause: Magnification has its own ShortcutPreference, but we did not
update correct title with getShortcutTitle()
Solution: Call setTitle(getShortcutTitle()) in initShortcutPreference()
Bug: 228752572
Test: manual test
Change-Id: I85b09a22032bad0a0c840590a98be88538a0499b
Root cause: Base class provides an override function for accessibility settings shortcut preference. But, it cannot update to the edit dialog.
Solution: Refine the resilience function and base class apply into accessibility settings shortcut preference and edit dailog.
Bug: 228830417
Test: Manual testing on all accessibility page and edit dialog
Change-Id: I84bc63a39cd9cfa7e12944dff20ee6b92879008d
If the device doesn't support window magnification featue, we
should hide the settings entry in mangification settings
Bug: 213414385
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: I73f087da54cd2930c049dabb6b843c3b373e3c20
Root cause:
Original framework design which has 3 seconds restriction to prevent users from easily triggering the accessibility volume shortcut when first time using it.
Solution:
The system would bypass the 3 seconds restriction if users manually set any feature as the volume key shortcut.
Bug: 202602908
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ToggleFeaturePreferenceFragmentTest
Change-Id: I324321577263904b6ff8b66e411766d16a6430dc
- Lowercase for one-handed mode, color correction, color inversion, extra dim in quick settings tooltips if these words are not first words.
Bug: 220655084
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityShortcutPreferenceFragmentTest ToggleFeaturePreferenceFragmentTest LaunchAccessibilityActivityPreferenceFragmentTest ToggleAccessibilityServicePreferenceFragmentTest
Change-Id: I309ca48cecb80942112c9d5adde5857c062706c8
- Show tooltips when main switch is on
- Reshow tooltips when rotate device
- Add abstract functions for child components to show tooltips
Bug: 210356011
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ToggleFeaturePreferenceFragmentTest
Change-Id: I543d8af7d24a9fc82659625961850f975a7a0787
Refactor SettingsContentObserver and rename it to
AccessibilitySettingsContentObserver. Besides, we register it to observe
follow typing feature preference value.
The reasons behind refactor:
1. We change callback signature due to the consistency for register it
by preference key, not by Uri.
2. We refactor the default preference key to a seperate method. Since
the default value is related to accessibility, we rename it with
accessibility prefix.
3. We can register different callback for difference collections of
preference keys.
Default preference keys: They existed in the previous constructor.
1. Settings.Secure.ACCESSIBILITY_ENABLED
2. Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES
Bug: 194668976
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
AccessibilitySettingsTest
AccessibilitySettingsContentObserverTest
AccessibilityShortcutPreferenceFragmentTest
MagnificationFollowTypingPreferenceControllerTest
ToggleFeaturePreferenceFragmentTest
ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: Iafd27e044ebe2536ae7ae55c1c80af54f7f0f822
There are 3 milestones in this feature.
1. Refactor the callbacks for Accessibility in WindowManagerInternal.
2. Implement this feature in such new architecture.
3. Implement the setting choice in preference page.
This CL is for the 3rd milestone.
We add a preference key "magnification_follow_typing" to access and
update the ACCESSIBILITY_MAGNIFICATION_FOLLOW_TYPING_ENABLED value
which controls its corresponding preference page UI.
Bug: 194668976
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
MagnificationFollowTypingPreferenceControllerTest
ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: Ib2602c997a535c1acca6a7ddd7bb2c25921f9280
The preference summary is not changed after
users disable the triple tap shortcut by the confirm
dialog. It is due to the fact that the fragment doesn't
observe the settings value change.
To fix it, we add the settings key to observe the change.
Bug: 208755360
Test: manual test
Change-Id: Ie5b7fc5e67c5491b53485af0d3d68d1789aeace4
Root Cause: Dialog only get updated when clicked the trigger button to show dialog.
Solution: Update the software shortcut content in dialog if needed in onResume() stage.
Bug: 183342594
Test: atest AccessibilityDialogUtilsTest
Change-Id: Ibcd66d6c57f1790f96f234e49f456cbc2c990f64
Problem: The dialog does not follow the Material Next guideline
Proposal:
1. Apply the dynamic color by removing SettingsTutorialDialogWrapperActivity which set extra theme
2. Hanlde the recreate case if shows the dialog directly
3. Update new Illustration in Pixel Lottie asset
Bug: 195980595
Test: Manual test
Change-Id: Ib6267128bbe5522ac8720c15fc2720c9a78f8671
Goal: Improve readability which is a bit difficult because of string concatenation for accurate translation.
Root cause: In some locales, framework features name would be a word rather than a product name. Hence it need to be in the different position in a sentence.
Solution: Use whole sentence to translate instead of concatenating the string could solve this issue.
Bug: 185478543
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityFooterPreferenceControllerTest
Change-Id: Id198805329be9c773df87f38a074ae956e4d0cdb
Goal: Improve readability which is a bit difficult because of string concatenation for accurate translation.
Root cause: In some locales, framework features name would be a word rather than a product name. Hence it need to be in the different position in a sentence.
Solution: Use whole sentence to translate instead of concatenating the string could solve this issue.
Bug: 185478543
Test: Manually testing
Change-Id: I5a0f04e7ab0d7aa789e10ce6f611cde9bf3660c1
Below components are updated.
1. The dialog title, content, and customized link when edit shortcut.
2. The shortcut preference summary in Setting page.
3. The tutorial title and content when shortcut on.
Partial rollback from commit 5fe2cdcf87
Bug: 190563948
Test: Manual test
Change-Id: I5e39b46c9387b4bf5a10f14453be9988d8b7fc9c
We concatenate the selected shortcut with a comma
that is not localized. To fix it we use listformatter
to concatenate them.
Bug: 186891004
Test: manually test with differnt languages.
Change-Id: I2c6692facd457b434c56a0633e784ce771905b29
Root cause: "Accessibility button" page apply BC style but other pages in SUW didn't. It causes page style inconsistency.
Solution: Don't show annotation link to make user open "Accessibility
button" page during SuW.
Bug: 187658718
Test: Manual testing
Change-Id: I6cc3da9a72b68829efd5537ae93fc329ef716fb4
Allow CaptionManager, Magnification, Color correction, Color inversion,
Time to take action, and Autoclick.
Bug: 187671696
Test: make RunSettingsRoboTests -j52 ROBOTEST_FILTER=AccessibilityFooterPreferenceTest
Change-Id: I9d753243d4f61b6b3d58b50425b7a75a812a481d
We move the mode settings because currently there is
only one item in the settings page. To fully test all logic,
we don't use fragament anymore in the controllerTest, and
test the interaction between the controller and the fragment
in the test of these two fragments.
Bug: 182992338
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
atest MagnificationModePreferenceControllerTest
atest MagnificationSettingsFragmentTest
manually test
Change-Id: Ia6b0ea4f116f3215407637d7aeaddb8d8196d8fb
Accessibility gesture is replaced by accessibility floating menu, related content in edit shortcut dialog and tutorial dialog are updated in this changelist.
cherry picked from commit 5fe2cdcf87
Bug: 173990914
Test: manual test
Change-Id: Ie529fa8a1f8ee87ca1ec5611b35675cdfd762165
Merged-In: Ie529fa8a1f8ee87ca1ec5611b35675cdfd762165
If the device doesn't support magnification area, we should hide the
settings entry in mangification settings
Bug: 177371954
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: I41fc3177f86c6a19e3ef0d2fbe5e052d77c1cb47
- Update wi-fi calling switch.
- Update the switches in Accessibility
Fix: 178673860
Fix: 177968565
Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: Id10e6a110f418ea500a2eaf3c54752bef4f36507
* Simplify StringJoiner to '+' since it only have one case
* Simplify Collections usage to use removeIf() and findFirst() directly
* Change class name SharedPreferenceUtils to PreferredShortcuts
Bug: 158540780
Test: atest ToggleFeaturePreferenceFragmentTest
Test: atest PreferredShortcutsTest
Change-Id: I02f03ccba09b6d7edaa5c0c8223ab3561a5e976b
* Add basic function equals(), hashcode() into data class
* Change flatternToString() to toString()
* Change constructor to fromString(flatternToString)
Bug: 158540780
Test: atest PreferredShortcutTest
Change-Id: I0ee46dd940d22ff9f168b95fe75d9cff2f0fddfb
* Show edit shortcut dialog should belong to the basic feature, so move
them back to ToggleFeaturePreferenceFragment
* Add test cases for UserShortcutType to prepare to further refactor
Bug: 158540780
Test: atest ToggleFeaturePreferenceFragmentTest
Change-Id: Ia84bea5581f85d199f395b2065652ce69738abbf
Goal:
Avoid the screen to be scrolled or moved by itself after changing theme.
Bug: 148785841
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ToggleFeaturePreferenceFragment
&& make RunSettingsRoboTests ROBOTEST_FILTER=ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: I35a41a920194d6de01b635ce4c8461df2635ce1a
1. Replace the video with the gif for Magnification.
2. Replace the static image with the gif for Color Inversion.
Bug: 153293657
Bug: 155946967
Test: manual test & robo test
Change-Id: Ic51c0ec45c10a7fd2b9f1ffb63865ebc764846ba
Root cause:
Didn't update the UI when settings value chagned.
Next:
Add the settings content observer.
Bug: 155837154
Test: manual test & Robo test & atest
Change-Id: I7be952a3a8824d00d3903d4a69beb8f992d638a1
This reverts commit 785af0c15a.
Bug: 155837154
Reason for revert: robolectric test fail at com.android.settings.accessibility.ToggleFeaturePreferenceFragmentTest
Change-Id: If8e5681b044171ad6941307489526cc3834f66b2
Root cause:
Didn't update the UI when settings value chagned.
Next:
Add the settings content observer.
Bug: 155837154
Test: manual test
Change-Id: Icee0bb50f88987ea6c8a0be59bd936628a32ca1e
Root cause: service status is not updated after the shortcut status
changed.
Next: Add callback to update the service status
Bug: 155157599
Test: Manual test
Change-Id: I286a04d43066c787304c54eb7b0dfdac5728b6ac