Commit Graph

23 Commits

Author SHA1 Message Date
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