Commit Graph

203 Commits

Author SHA1 Message Date
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
Yiwen Chen
494071463b Keep consistency between sound and accessibility settings.
Bug: 130741987
Test: Tested on device
Change-Id: Id6dd485c73f9453970b8d79929ffc04acb2c76c8
2019-05-23 00:13:01 -07:00
Leon Liao
d741850f0c Modify Accessibility Setting UI for timeout feature
Using single timeout setting page instead of current two timeout pages
to keep the user experience simple and reduce confusion.

Current timeout page & API:
'Time to take action'
    --  Settings.Secure.ACCESSIBILITY_INTERACTIVE_UI_TIMEOUT_MS
'Time to read'
    --  Settings.Secure.ACCESSIBILITY_NON_INTERACTIVE_UI_TIMEOUT_MS

New timeout page & API:
'Time to take action(Accessibility timeout)'
    --  Settings.Secure.ACCESSIBILITY_INTERACTIVE_UI_TIMEOUT_MS
    --  Settings.Secure.ACCESSIBILITY_NON_INTERACTIVE_UI_TIMEOUT_MS

Bug: 132247225
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=AccessibilityTimeoutControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=AccessibilitySettingsTest
Change-Id: I0b69682425324d3b1e0ff3f7b6e2c299b60cd215
2019-05-16 18:58:50 +08:00
Kevin Chang
70e9b59a51 Change the string of Captions and reorder the feature in audio category
Bug: 128887817
Test: Visual
Change-Id: I4bcde9c52b4ed3484727e79758ef37f4b05a209d
Merged-In: I4bcde9c52b4ed3484727e79758ef37f4b05a209d
2019-04-29 02:10:25 +00:00
Salvador Martinez
ef7ce46657 Change dark theme screen to toggle
The dark theme screen has been removed in favor of a simple
toggle with a dialog that shows up the first time a user
tries to enable dark theme when in light theme.

Test: robotests pass
Bug: 130251804
Change-Id: I48f8e24a2b2a117e5a8054c5bc0b240ba68fe1ad
2019-04-15 19:52:49 -07:00
Salvador Martinez
70da69b0ac Merge "Update dark mode in accessiblity settings" 2019-03-28 20:56:27 +00:00
Salvador Martinez
194abe94d0 Update dark mode in accessiblity settings
There was an entry point to dark mode that wasn't updated when the
display settings one was changed to point to a new screen. This
change makes it so that clicking dark mode in accessiblity also
opens the same screen.

Test: robotests pass
Bug: 129406772
Change-Id: I0ad830638e04e5520cdf7de6927764fa6b68a179
2019-03-27 18:29:40 -07:00
Mill Chen
9ec418f4db Merge "Normalize the icons in Accessibility" 2019-03-27 06:34:50 +00:00
Mill Chen
9703d79ce2 Normalize the icons in Accessibility
The icons displayed in Accessibility are larger than others, they should
be the same size as app icons. Change the drawable's icon size to fix
it.

Fixes: 123411506
Test: visual, rebuild
Change-Id: Ib693dd2ac8e2e191e5ecb2d0d8d4fdac5a32a2de
2019-03-26 16:14:34 -07:00
Anthony Tripaldi
308d833d16 Add Live Caption preference to Accessibility page.
This reverts commit fa27a88292.

The original was only a temporary revert in order to remove from initial beta release for dogfooding before the feature was ready.

Reason for revert: b/123652115

Bug:123652115
Test: manual
Change-Id: Id647c2992e30289d72a4f6144829a997677be3fa
2019-03-26 13:09:50 -04:00
Kevin Chang
a78b9222b0 Duplicate dark mode settings to accessibility display settings
Bug: 123227114
Test: Manual
      make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilitySettings
Change-Id: Icb60bc18e31377a2e73780004bd1bdea7bc96eea
2019-02-27 09:18:40 +08:00
Fan Zhang
a0a2e72ca6 Merge "Revert "Add live caption preference in accessibility page."" 2019-01-30 20:14:22 +00:00
Fan Zhang
fa27a88292 Revert "Add live caption preference in accessibility page."
This reverts commit d64901494f.

Reason for revert: b/123636344

Change-Id: If6307935ba3613cb24f5bab2234febef83c6f7d2
2019-01-30 18:10:17 +00:00
TreeHugger Robot
4012a31c24 Merge changes from topic "settings_westworld"
* changes:
  Reset allow background activity to default on
  Migrate all MetricsProto enums to SettingsEnums
2019-01-19 04:09:50 +00:00
Christine Franks
7c7e0d4d7d Merge "Move color transform check to ColorDisplayManager" 2019-01-18 23:08:37 +00:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
Christine Franks
f2e10290d4 Move color transform check to ColorDisplayManager
Bug: 111215474
Test: make RunSettingsRoboTests
Change-Id: I71c92b3f06382248923ac48be956515b0502d684
2019-01-14 12:40:45 -08:00
Fan Zhang
d64901494f Add live caption preference in accessibility page.
Change-Id: Idd9725ddbbcf658325b1f04b07a0ed9cfa6c2682
Fixes: 121373754
Test: robotests
2019-01-11 15:15:12 -08:00
Alexey Kuzmin
3c51e824eb Split ring and notification vibration settings
Synchronize settings between sound and accessibility menus

Bug: 116172311
Test: See accessibility vibration settings - ring and notification
settings sould be separate. Try changing vibration settings in sound and
accessibility menus - the settings should stay in sync.

Change-Id: I515a7188cdf5a26a229ac8f08c6fcfe98e2f91a0
2019-01-10 14:22:49 +00:00
Leon Liao
d9c4044722 Fix content timeout item misorder in Display category in A11y Settings
A11y Content timeout item is disordered by program while device supports HWC
accelerated color transform. Add code to fix its order with present resource order.

Bug: 119283926
Test: atest AccessibilitySettingsTest
Test: make RunSettingsRoboTests
Change-Id: I5e8bff2347353d2c4fe9aa550d7efaa613bf2a90
2018-12-07 11:08:43 +08:00
Leon Liao
2457f46fa8 Add summary with accessibility timeout item
Add summary with accessibility timeout item in Accessibility
Settings. This summary describe its level to time limit of
Accessibility timeout feature.

Bug: 119283926
Test: atest AccessibilitySettingsTest
Test: atest AccessibilityTimeoutControllerTest
Test: make RunSettingsRoboTests
Change-Id: I86c096e6f4adb62150e1ff2af4c22afac240b41e
2018-12-05 05:35:54 +08:00
Fan Zhang
f535055e2e Use safe icon when building unavailable slices.
And move ic_a11y_generic from mipmap to drawable. IconCompat doesn't
support mipmap.

Bug: 118691898
Test: robotests
Change-Id: I6799f3d31d2c5654319e5a97bf8ca14992e785a7
2018-10-30 14:48:47 -07:00
Fan Zhang
9aca4cb48c Add config to disable app tray preview in display size.
Also move some files

Change-Id: I4636fcd81425991acadede0b703e09513c82543c
Fixes: 113374067
Test: robotests
2018-09-10 15:03:54 -07:00
Philip P. Moltmann
e3f721132a RestrictedLockUtils was split into ...Internal
This means that in some cases RestrictedLockUtils has to be used and in
some RestrictedLockUtilsInternal.

This causes a lot of trivial code changes.

I also updated the ordering of the imports in all affected files.

Bug: 110953302
Test: Built
      make -j RunSettingsRoboTests
Change-Id: I9bdf8b89134f853bae4f38c81af436715c73e924
2018-08-30 08:11:39 -07:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00