Commit Graph

33 Commits

Author SHA1 Message Date
Riley Jones
75500c02b2 Cleanup of deprecated A11y settings functions
Bug: 367414968
Test: atest com.android.settings.accessibility
Flag: EXEMPT cleanup
NO_IFTTT= Change does not alter preference list

Change-Id: I64f5f7fba112b6fb5035b88f01c04d9ee309f2c0
2025-01-21 21:07:34 +00:00
Riley Jones
178bdd4c60 Cleanup of AccessibilityUtil#hasValueInSettings
Settings should now be able to directly use the equivalent ShortcutUtils functions,
so the unnecessary code is being removed from AccessibilityUtil.
This does cause much behavior to depend on A11yManager instead of Settings.Secure,
so several tests need their conditions updated.

Test: atest com.android.settings.accessibility
Flag: EXEMPT internal refactoring
Bug: 367414968

Change-Id: I95f81f7d78b074def0fe2d1e01f60ceb7e142dac
2024-12-17 20:03:16 +00:00
Riley Jones
6107fd8591 Cleanup deprecated functions in AccessibilityUtil
Flag: EXEMPT code cleanup
Bug: 367414968
Test: atest com.android.settings.accessibility
Change-Id: If69a964720fc91ce0ad3661f956c4818f4f2f9dd
2024-12-05 23:45:33 +00:00
Riley Jones
acccaff128 Cleaning up quick settings flag in Settings app
Removes all instances of a11y_qs_enabled. Any code that would be nontrivial to remove has been deprecated for later cleanup.

Test: atest com.android.settings.accessibility
Flag: EXEMPT flag cleanup
Bug: 367414968

Change-Id: I81f3c9cee377535eaa552a170d58ec1a79d1da65
2024-12-02 20:38:10 +00:00
Riley Jones
ea06748ee2 Provides an ordered array of shortcut types so Settings presents shortcuts in the desired order
NO_IFTTT=corrects ui order
Flag: android.provider.a11y_standalone_gesture_enabled
Test: atest AccessibilityUtilTest
Bug: 371463731

Change-Id: Ia1864076faa281cf57c469a2d0d34f859858d859
2024-10-10 20:12:04 +00:00
Riley Jones
3d4b0c5440 Refactoring A11y shortcut functions in Settings to use GESTURE
Properly integrating GESTURE into Settings, so that text pertaining to the gesture shortcut are displayed when appropriate.
Heavy refactoring has been done to allow for easier cleanup and expansion

Demo video: https://x20web.corp.google.com/users/jo/jonesriley/splitShortcut/a11ySettingsGestureCompat.mp4

NO_IFTTT=changes do not alter the order of the shortcuts.

Bug: 365570709
Test: atest com.android.settings.accessibility
Flag: android.provider.a11y_standalone_gesture_enabled
Change-Id: If90719763a48e3b8bc35988a1de9a352a766953b
2024-09-28 02:50:09 +00:00
Riley Jones
8f313621aa Refactoring Accessibility settings to use ShortcutConstants.UserShortcutType
This removes AccessibilityUtil.UserShortcutType,
replacing all mention of it with ShortcutConstants.UserShortcutType

NO_IFTTT=UI order not changed
Test: atest com.android.settings.accessibility
Bug: 322014084
Flag: EXEMPT internal refactoring

Change-Id: I18695d040c4bd08a455143594e770adda2b1a8de
2024-07-01 19:42:32 +00:00
Chun-Ku Lin
8b67c17a7b Show QS shortcut option if the a11y feature provides a tile.
Bug: 314852953
Test: atest com.android.settings.accessibility
Test: atest com.android.settings.accessibility.shortcuts
Test: manual
Flag: ACONFIG android.view.accessibility.a11y_qs_shortcut STAGING
Change-Id: Id7a6b3adfd4c4f3cb2b9f7fe15269b57a3d00543
2024-03-06 20:26:28 +00:00
Jean Chen
48d73aa3f3 feat(MultiFingerMultiTap): Add two-finger triple-tap shortcut on magnification dialog
The shortcut is separate from single-finger triple-tap. It’s under hardware shortcut and above/outside of Advanced section.

Bug: 297805269
Test: manual
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: Id74cf3e457c04e167f3100d977b6c70c5d601026
2023-10-25 13:30:27 +00:00
Chun-Ku Lin
b65108ba1b Split the string resource id for non-generic accessibility preference.
- Keep the accessibility settings strings the same as in U.

Bug: 289425138
Test: manual
Test: atest
Change-Id: Iddbbfe627c93529d2421e153094a30628229c4bc
2023-08-08 19:17:54 +00:00
Chun-Ku Lin
b8084ecfcd Unified service and shortcut state summary on a11y settings page.
Bug: 210026562
Test: manual
Test: atest

Change-Id: I4d5ff6b10d6bfd2fe6b3de1849d00a9d084bf269
2023-05-23 22:19:55 +00:00
Lifu Tang
caa1b51ef2 Revert "Remove duplicate strings."
Revert submission 19748582-settings_yesno

Reason for revert: Common strings in English could be translated into different strings in other languages.

Reverted changes: /q/submissionid:19748582-settings_yesno

Bug: 272603842
Test: build and open Settings app
Test: atest SettingsRoboTests
Change-Id: Iaad301c5513478fb95e40987ea3ccb4f923d71fa
2023-03-15 22:39:24 +00:00
Kweku Adams
5949fccc7a Remove duplicate strings.
"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
2022-08-26 00:07:08 +00:00
Peter_Liang
f94762176f Fix that holding volume buttons to activate Extra dim feature doesn't do anything.
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
2022-03-17 15:49:45 +08:00
menghanli
01d02d3d8e Show different tooltips for QS features auto-added and non-auto-added
There are 2 different kinds of auto-added / non-auto-added subtext in QS tooltips for framework features. Show animation in the settings page for full flow for non-framework services.

Bug: 218968108
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityQuickSettingsTooltipWindowTest AccessibilityShortcutPreferenceFragmentTest
Change-Id: I462cfcece959df8b9d97fab8e28337bceca9e25e
2022-02-15 16:09:30 +08:00
Peter_Liang
af5f355b35 Add the max height restriction into the illustration view.
Bug: 191721423
Test: manual test
Change-Id: I3829ead500eaf586f6d543855690ee8f0d0913ff
2021-09-24 14:42:53 +08:00
jasonwshsu
0377025554 Add the preference controller to control accessibility button size preference
cherry picked from commit 04955b96ae

Bug: 173940869
Test: atest FloatingMenuSizePreferenceControllerTest
Change-Id: Ic206a940abde90641442df37a634c8cb3a345597
Merged-In: Ic206a940abde90641442df37a634c8cb3a345597
2021-03-17 22:57:50 +08:00
ryanlwlin
4806a38516 Add uninstall option in the capabilities confirm dialog
Uninstall option is visible only when the application of the
service is not system App. It provides an efficient way to
uninstall the App if users are shocked with the perimssions
they need to grant.

Bug: 176877955
Test: Install an App with AccessibilityService and uninstall
it with this option.

Change-Id: I6b60cc56d8d34c2983458a676b500035551ec9df
2021-02-23 20:43:27 +08:00
jasonwshsu
43daeb90da Change the name of accessibility service fragment type to more descriptive names
Bug: 155052371
Test: manual test
Change-Id: I097138c84083528acd4d16a145921227ffe3f736
2020-04-28 00:55:04 +08:00
jasonwshsu
e1eec16427 Use new setting key to maintain the list of user assigned shortcut targets.
* Framework changes to keep ACCESSIBILITY_BUTTON_TARGET_COMPONENT
contains only a single target, use ACCESSIBILITY_BUTTON_TARGETS to maintain the targets list.

Bug: 151295675
Test: manual test
Change-Id: I2218402fd122acc9a86c64127e9cfcf77a6e241e
2020-04-16 17:21:20 +08:00
menghanli
5d7083a103 ShortcutPreference Toggle design (2/n)
- Removes edit shortcut disable condition.
- Shows "off" if user removes all items in edit dialog.
- Restores last time what user chosen options when show edit dialog.

Bug: 148989269
Test: Manually test
Change-Id: I105abda782999d38c92e3de9811e2fd378869e73
2020-03-06 18:02:53 +08:00
Peter_Liang
ab05476fc1 Fine-tune the widget of "Allow rich content in Accessibility Settings" for security.
1. Remove tag checker in HtmlTextPreference.
2. Set the max height for AnimatedImagePreference.

Bug: 149516547
Test: manaul test
Change-Id: I98f49d055db9427d91a3f1ca816e94a11d29cd3d
Merged-In: I98f49d055db9427d91a3f1ca816e94a11d29cd3d
(cherry picked from commit 10bc375176)
2020-02-25 09:06:12 +00:00
jasonwshsu
13b6850c52 Fix the NPE error when get the service summary.
* Check NPE for AccessibilityInfo.loadSummary()
* Remove the state argument that could get from info argument

Bug: 148837311
Test: Manual test
Change-Id: Ic6906fdbdd7f1c241776d1045be33f89468670b6
2020-02-15 11:49:37 +08:00
menghanli
04a46cb7c6 Remove on/off information if the services cannot toggle service on/off
Bug: 148837311
Test: Manual test
Change-Id: I57e0ed33bebc41cde99008bb2ed014c63194c52a
2020-02-13 10:41:30 +00:00
menghanli
bf46032074 Support accessibility shortcut secondary action (10/n)
Integrate with Talkback enabled and change the behavior as below:
1. Show 3-finger swipe up from bottom summary
2. Show 3-finger icons for edit shortcut dialog
3. Dismiss the running the edit shortcut dialog

Bug: 142530063
Bug: 142531156
Bug: 147989432
Test: make RunSettingsRoboTests2
Change-Id: I2f34b8eebfdc5a385d72402e95a8b1d0bde4a428
2020-01-21 15:58:43 +08:00
menghanli
5d0f336fec Support accessibility shortcut secondary action (8/n)
Integrate with the multiple shortcut selections and change the behavior as below:
- Get the shortcut type from system provider or shared_prefs if this is first time to use.
- Update the shared_prefs for what user seen.

Bug: 142530063
Bug: 142531156
Test: make RunSettingsRoboTests2
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityUtilTest
Change-Id: I58aeb960e2c4aa0bc2432be34c1372c0de89117a
2020-01-16 22:57:11 +08:00
jasonwshsu
fb576356aa Accessibility shortcut secondary action - handle all preferred shortcut type key
- save and restore all preferredShortcutType: SOFTWARE, HARDWARE, TRIPLETAP

Bug: 142530063
Test: manual
Change-Id: I7dd714d1516f49e89c42822241f9cb2b41ae2d2e
2020-01-14 12:15:14 +08:00
menghanli
334dc4f20b Support accessibility shortcut secondary action (7/n)
Implements sharedPreference to keep the user preferred shortcut for each
service.

Bug: 142530063
Bug: 142531156
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ToggleFeaturePreferenceFragmentTest
Test: make RunSettingsRoboTests2
Change-Id: I2a7c54ddc32764f6d88f2efed87982d469acc183
2020-01-13 12:34:04 +08:00
jasonwshsu
8ef01d25fb Accessibility shortcut secondary action - save and restore shortcut key
- Implement onCheckboxClicked() to save shortcut key
- restore shortcut key when onViewCreated()
- Use preferredShortcutType to handle settings key

Bug: 142530063
Test: make -j52 RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityUtilTest
Change-Id: Iabe636641968d346e52becea19b6e201ea5bc1fb
2020-01-06 13:56:48 +08:00
menghanli
a5d8e12766 Support accessibility shortcut secondary action (6/n)
Implements new edit shortcut dialog selection and save what user
prefered key back for color inversion, color correction, magnifiction,
downlaoded service - LEGACY, INVISIBLE, INTUITIVE case.

Bug: 142530063
Bug: 142531156
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityUtilTest
Test: make RunSettingsRoboTests2
Change-Id: I94607db918047ae4082457dd33f17c8675934e2c
2019-12-31 17:42:06 +08:00
jasonwshsu
3d94a57d97 Accessibility shortcut secondary action - divide different fragment for different fragment type
Different accessibility service fragment type have different UI.
- AccessibilityServiceFragmentType.LEGACY will use LegacyAccessibilityServicePreferenceFragment
- AccessibilityServiceFragmentType.INVISIBLE will use InvisibleToggleAccessibilityServicePreferenceFragment
- AccessibilityServiceFragmentType.INTUITIVE will use ToggleAccessibilityServicePreferenceFragment

Bug: 142530063
Test: Manual
Change-Id: Ib32a4f97514450e5c0d29e99c22935efecf8b6df
2019-12-26 11:40:11 +08:00
jasonwshsu
ae6c855315 Accessibility shortcut primary action - method to check shortcut type
Add method to check shortcut type that would be used in implementing
different shortcut UI.

Bug: 145490632
Test: make -j52 RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityUtil
Change-Id: I5468ff50df35cc0b80f0ae55019164f334ba6c59
2019-12-11 16:06:40 +08:00
Mill Chen
8d240c7f28 Separate daltonizer preference controller form accessibility
Bug: 135056871
Test: manual, robotests
Change-Id: Ibc730004f1a25a2e97abcc0bbad2dfc9b420d645
2019-07-02 15:08:17 +08:00