Commit Graph

177 Commits

Author SHA1 Message Date
Ben Chung
478db86589 Update accessibility settings layout
Accessibility settings category restructure
1. Add caption category fragment for related accessibility services.
2. Remove experimental category.

Bug: 174829936
Test: atest AccessibilitySettingsTest
Change-Id: I13b1ed62afe0634329d1e340ba154454640fadd6
2021-02-14 15:11:59 +00:00
Ben Chung
e66e641980 Add accessibility shortcuts fragment in a11y settings
Accessibility settings category restructure, add accessibility shortcuts
fragment for related accessibility services.

Bug: 174829936
Test: atest AccessibilityShortcutsFragmentTest, atest AccessibilitySettingsTest
Change-Id: I9706906863872bc60d31eae54bbf3a35d70e812e
2021-02-05 07:30:49 +00:00
Ben Chung
3e2e4407cf Accessibility settings display category restructure, add text and display fragment for related accessibility services.
Bug: 174829936
Test: atest TextAndDisplayFragmentTest, atest AccessibilitySettingsTest
Change-Id: Ie2cf147de53385ae0c626c8472306f1b85317686
2021-01-06 18:26:43 +08:00
Sally
b9ff672a31 Add a setting page for Reduce Bright Colors under A11y
This is essentially a copy page of ToggleDaltonizerPreferenceFragment.
We extend ToggleFeaturePreferenceFragment to maintain consistency with
other shortcut assignable a11y feature.

UI is a draft

This CL:
1) allows users to enabled/disable RBC with the a11y shortcut (button,
gestures, volume keys), if assigned
2) adds a slider and persist switch to the template
ToggleFeaturePreferenceFragment page (which already contains a feature
switch, shortcut preference, and footer description)
3) enables/disables the intensity slider when RBC is on/off
4) sets placeholders for calling into ColorDisplayService in
controllers and tests
5) follows convention set by other color transformations settings and
places feature under Experimental section in A11y settings page if
transformations can't be efficiently performed by hardware

Test: A11y setting and page appears, tested activation with shortcut,
preference controller tests
Bug: b/128465252

Change-Id: I291bb86ce3d855ce052ca70dc7a941a888e2c723
2020-10-21 23:08:53 +00:00
Peter_Liang
2387212823 Fix the screen scrolling down after enabling dark theme.
Root Cause:
Dynamically update preferences behind onCreate lifecycle.

Solution:
Move it to previous lifecycle.

Bug: 139877200
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilitySettingsTest
Change-Id: I1638a8b2d48369ec1ea0b996fbed09233c5e3649
2020-08-06 21:22:19 +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
Jason Hsu
79d73eaa59 Merge "Use new setting key to maintain the list of user assigned shortcut targets." into rvc-dev 2020-04-24 03:07:39 +00:00
jasonwshsu
f74c0a72b6 Show default description only if description and html description are empty
* AccessibilitySettings only get the description to pass to the
ToggleFeaturePreferenceFragment
* ToggleFeaturePreferenceFragment handle the default description logic

Bug: 154092127
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.accessibility.AccessibilitySettingsTest"
Change-Id: I516a393aeef1472ca5d185d477a2b0b108fc5342
2020-04-21 01:34:22 +00:00
jasonwshsu
1be2666d11 Remove unused attribute 'EXTRA_SUMMARY_RES'
* Magnification already use EXTRA_HTML_DESCRIPTION to replace it.

Bug: 154092127
Test: manual test
Change-Id: I5385907eb0911894159a80444493bf233bb43e1a
2020-04-20 23:09:59 +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
Hiroki Sato
0e75d475ec Hide Bluetooth, Reset, Accessibility Settings in ARC
This is an upstreaming change of http://ag/8541963 and
http://ag/10296201 to hide some items from settings search.

This CL also adds javadoc to some settings classes to fix pre-upload
warnings.

Bug: 153704887
Test: Manual. In ARC build, "bluetooth" and "accessibility" no longer shows related settings.
Change-Id: Ic3e9217944251adbea1bdd67baf66d3a9e89583a
2020-04-10 16:00:57 +09:00
menghanli
19cf6ddff8 Update R acessibility assets and strings (2/n)
- Temporary-use template summary by shortcut state

Bug: 148837311
Test: Manual test
Change-Id: Ia720b8f3f317bb1874d6758ebc4fbf4145d0c217
2020-03-11 17:21:27 +08:00
jasonwshsu
c7fa4da58d Accessibility shortcut primary action - add settings UI for accessibility shortcut type fragment
Bug: 142531433
Test: manual test
Change-Id: I6a9eebc1718f2b924cfb373f09abb57890fa10a5
2020-03-04 16:06:41 +08:00
jasonwshsu
b67d873372 Accessibility shortcut primary action - setup entry for launched type fragment.
* Reduce the complexity of updateServicePreferences.
* Introduces RestrictedPreferenceHelper to setup installed
AccessibilityServiceInfo and AccessibilityShortcutInfo.

Bug: 142531433
Test: make RunSettingsRoboTests
Change-Id: I0f5eeac56a93caadeb05c25f1f8c4daa0d775b35
2020-02-19 15:25:48 +08: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
Menghan Li
14c548e38a Merge "Remove on/off information if the services cannot toggle service on/off" 2020-02-13 15:33:48 +00: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
Yiwen Chen
54114d7895 Merge "Device config flag clean up." 2020-02-12 22:07:42 +00:00
menghanli
4705d87c4a Update the shortcut design strings.
Bug: 148837311
Test: Manual test

Change-Id: Iac96b3f36e4298aea36bbde5632f701ad1e9572d
2020-02-07 14:23:22 +08:00
Yiwen Chen
950023fc36 Device config flag clean up.
Test: built and tested on device
Change-Id: I4e64cceca629c0b4c0a5d0a5ec23bc2d75f4aead
2020-02-05 16:15:35 -08:00
menghanli
30e5fea655 Change the Settings to app name with settings
Bug: 148837311
Test: Manual test
Change-Id: Ib27fd840c1a33378d9b301658b5d6c9ef148c615
2020-02-04 17:13:18 +08:00
Jason Hsu
24af3f4c81 Merge "Accessibility shortcut secondary action - divide different fragment for different fragment type" 2019-12-26 13:42:17 +00:00
menghanli
b7306044c9 Create settings for color inversion (2/n)
Provide a setting for new color inversion design.

Bug: 146019226
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ColorInversionPreferenceControllerTest
Test: make RunSettingsRoboTests2
Change-Id: I1d081c6321ee96d48e8f52304893e4a5fb59333a
2019-12-26 06:39:44 +00: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
Peter_Liang
64f1374c64 Support the rich content for accessibility service (1/n)
Goal: 1. let third party developer can use html text that include from their local image file and
         animated image instead of only plain text to rich their content.
      2. Avoid malicious links made by third party developer

Action: 1. Add html, static text, and animated image preferences.
        2. Add android:AnimatedImageDrawable, and android:htmlDescription attributes.
        3. Fine-tune interface and integration
        4. Add custom tag filter

Bug: 136292241
Test: Maunal & make RunSettingsRoboTests
Change-Id: I82cd5319efb7faa1ff7e8354a279828fce5135b8
2019-11-27 20:42:39 +08:00
Jackal Guo
52bd31f5df Update the logic of querying crashed a11y services
Bug: 129689483
Test: a11y CTS & unit tests
Test: manual
      1. Install and enable an intentional crashed a11y service.
      2. After it's crashed and malfunctioning, re-enable it.
      3. Check if it's bound again.

Change-Id: Ifda4fddfbe9b38841f5cc143c32ab1d2f059350c
2019-10-14 12:25:35 +08:00
Raff Tsai
966fa01423 Use SettingsLib Indexable
- Use SettingsLib Indexable
- Directly use resource id in getPreferenceScreenResId

Bug: 135053028
Test: roboletric
Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
2019-09-25 18:24:56 +08:00
Raff Tsai
ac3e0d0988 Directly use BaseIndexableProvider
- Add function getXmlResourceId, Fragments don't need to write
xml resource id twice.
- Remove getPreferenceControllers from Indexable.java. Because it will
move to SettingsLib later for other apps which don't need this function

Bug: 135053028
Test: robolectric
Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
2019-09-24 00:35:52 +08:00
Raff Tsai
1f30b1cd67 Merge similar BaseSearchIndexProvider code together
Bug: 135053028
Test: robolectric, check search_index.db contains the same items
Change-Id: If3c18a170b0e671690df1fdf26e59a421d2c48cd
2019-09-12 11:09:09 +08:00
Mill Chen
6f3b222ca5 Clean up in-code preference controllers from accessibility
Bug: 135056871
Test: manual, robotests
Change-Id: I0c1358657d3f57ddae2b8f2b12ee610e7363f41f
2019-07-09 17:35:32 +08:00
Mill Chen
d2d1801e3b Separate long press timeout preference controller form accessibility
Bug: 135056871
Test: manual, robotests
Change-Id: If49e4336b3461ec2a9568b8652c5aab0ff64ecfe
2019-07-03 21:27:34 +08:00
Mill Chen
08c4c4aadd Separate shortcut preference controller form accessibility
Bug: 135056871
Test: manual, robotests
Change-Id: I1dc61d50f46dfbd9bbd6fa33ecbc03157427d0b1
2019-07-03 20:15:09 +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
Mill Chen
7f995a609d Separate caption preference controller from accessibility
Bug: 135056871
Test: manual, robotests
Change-Id: Ibcc867f09b6b9cf8cd27b2d93241042b4f88c62d
2019-07-01 17:04:00 +08:00
Mill Chen
5aa742bc00 Separate vibration preference controller from accessibility
Bug: 135056871
Test: manual, robotests
Change-Id: Ic309fd69b68bfa1c3290a696e0987de2621f6dc4
2019-06-28 11:38:13 +08:00
Mill Chen
79ce2c95f4 Separate mono audio preference controller from accessibility
Bug: 135056871
Test: manual, robotests
Change-Id: I839c07a3a61ae97f33b339d307734504c45a6622
2019-06-28 11:22:36 +08:00
TreeHugger Robot
1bcc2ff789 Merge "Separate auto click preference controller from accessibility" 2019-06-28 03:01:21 +00:00
Mill Chen
c786ae184b Separate power button preference controller from accessibility
Bug: 135056871
Test: manual, robotest
Change-Id: Ia3c2134bd9f88a39a796e4201f7bdf8c3015baa1
2019-06-27 22:59:55 +08:00
TreeHugger Robot
10fc07e72e Merge "Separate text contrast preference controller from accessibility" 2019-06-27 14:50:56 +00:00
Mill Chen
081ae31e7d Separate auto click preference controller from accessibility
Bug: 135056871
Test: manual, robotests
Change-Id: I5125fd79d0bc257ebf8108dd84d520d25a0ed669
2019-06-27 22:40:45 +08:00
Mill Chen
5da94319aa Separate text contrast preference controller from accessibility
Bug: 135056871
Test: manual, robotests
Change-Id: Ia28d8038f341a1a74385d168f78da8a10cca8fcd
2019-06-27 21:17:37 +08:00
Mill Chen
d828275411 Separate large pointer preference controller from accessibility
Bug: 135056871
Test: manual, robotest
Change-Id: Id8e81f70d5121a97b6766b444298379f7ce062ea
2019-06-26 17:42:57 +08:00
TreeHugger Robot
01823a53af Merge "Separate disable animations preference controller from accessibility" 2019-06-26 08:42:03 +00:00
Mill Chen
223bf1b520 Separate a11y timeout preference controller from accessibility
Bug: 135056871
Test: manual, robotest
Change-Id: I00d40451b40c0a4d5e214b23d78139195d98e42b
2019-06-26 15:10:04 +08:00
Mill Chen
d2deb850d3 Separate disable animations preference controller from accessibility
Bug: 135056871
Test: manual, robotests
Change-Id: I14f322d91179779f2d758c58a2ed729efc0b45f5
2019-06-26 14:58:44 +08:00
Mill Chen
2e3d08e8d4 Clean up AccessibilitySettings
Since AccessibilitySettings has been converted to DashboardFragment, and
those preference controllers are moved to corresponding xml files which
will be loaded statically, so here we are removing those in-code
preference controllers as we no longer need them.

The following controllers will be removed:
ColorInversionPreferenceController
LockScreenRotationPreferenceController
FontSizePreferenceController
MagnificationPreferenceController

There are still some controllers used here. We will remove them soon
once they are all converted to static ones.

Bug: 135056871
Test: manual, robotests
Change-Id: I7897b984b2275e98f958ad65b576dd08aaab3f06
2019-06-24 15:00:09 +08:00
Mill Chen
e5ab0d68f2 Convert AccessibilitySettings into a DashboardFragment
Bug: 135056871
Test: manual, robotests
Change-Id: Iafc359fc3bba1adce46a28b18449af2e9abf8a29
2019-06-21 18:01:34 +08:00
Mill Chen
d37618c8ed Pull out PreferenceControllers from AccessibilitySettings
- clean up the format of accessibility_settings
- To leverage the existing TtsPreferenceController and
FontSizePreferenceController
- pull out the logic of magnification from AccessibilitySettings

Bug: 135056871
Test: manual, robotest
Change-Id: I414fa7a04fd558d3a3a8b5e157469c198a772732
2019-06-19 15:05:39 +00:00
Mill Chen
dce601db84 Pull out a PreferenceController of lock screen from accessibility
To reduce the complexity of AccessibilitySettings, we are planning to
create a bunch of preference controllers. First of all, we are converting
lock screen preference to a preference controller. The rest part will be
uploaded soon.

Bug: 135056871
Test: robotest, manual
Change-Id: I6079136f3d08934c9a5363eb4d0e0ade29f8ba99
2019-06-19 16:44:42 +08:00
Yiwen Chen
cbb6ea5ea4 Merge "Keep consistency between sound and accessibility settings." 2019-05-23 14:52:48 +00:00