Commit Graph

139 Commits

Author SHA1 Message Date
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
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
Fan Zhang
9ce4a1fcde Use searchable="false" to suppress nonIndexables.
When possible, remove or simplify getNonIndexable() logic in fragments,
and use searchable="false" in xml to suppress index.

Change-Id: I5bdf5bc7d5494a64cdd9e230a51321a4b210af69
Fixes: 112608186
Test: robotest and manual search
2018-08-17 09:21:05 -07:00
timhypeng
53a12ee7b8 Add Hearing Aid UI into Settings-Accessibility App
- dynamically show/hide preference by HearingAid profile is supported or not
- add AccessibilityHearingAidPreferenceController to handle hearingAid preference
- add HearingAidDialogFragment to handle dialog behavior

Bug: 109948484
Test: make -j50 RunSettingsRoboTests

Change-Id: Ic55dde475dc40311f7e652f4a86d342597f09f0e
2018-07-30 16:48:39 +08:00
Jackal Guo
6490923251 Change the order of preferences in a11y
Some preference items have the same order, and it makes these items
be sorted in different position per languages. Use unique order for
each items instead.

Bug: 77949267
Test: atest CtsAccessibilityTestCases
Test: manual check the order in different languages
Change-Id: Ibfcb316c4299266b053053d9d88819a7dcc158fa
2018-07-17 11:19:05 +08:00
Fan Zhang
af1552251f Add some pages to search index.
* Notification access page
* VR Listener page
* Feature flags in dev options
* QS Tile developer options
* User dictionary
* Billing cycle
* Some accessibilty pages

Bug: 70720645
Test: robotests
Change-Id: I4f7d3d65b2803cebf178ac345a79721232df707c
2018-07-11 16:39:29 -07:00
Fan Zhang
78ea7da54c Misc tweaks to Indexable usage and tests.
- Make SettingsPreferenceFragment implement Indexable directly
- Add existing fragments that are SettingsPrefFragment but not Indexable
  to grandfather list.
- Fix "font size" fragment so it shows up in search properly.
- Remove duplicates for "lock screen display", "Screen saver".

Bug: 70720645
Test: robotests
Change-Id: I44ce0cac0fdf5e882b315861bb4bebc45dbe01e6
2018-07-02 16:46:23 -07:00
hjchangliao
bc64434365 Add TogglePrefController for Color Invert
Add ColorInversionPreferenceController,
and remove old control code in fragment.

Change-Id: I773e5aa2d6c9bf6b5140be45ee60567a7ed22318
Fixes: 67997748
Test: make RunSettingsRoboTests
2018-06-22 10:03:25 +08:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Michael Wright
1c7ae169ac Merge "Hide haptic intensity settings for devices without enough dynamic range." into pi-dev am: 8c60fc69b7
am: 23460d03bc

Change-Id: I5c5e8a4157874f19abe28201fba772c72bc7f9d9
2018-05-25 19:17:33 -07:00
Michael Wright
3dbaac6e71 Hide haptic intensity settings for devices without enough dynamic range.
Despite our hope, devices prior to P18 just don't have the dynamic range
to give three distinct vibration intensity settings. Given this, only
show an on / off toggle for devices by default unless they explicitly
opt-in to multiple intensity levels.

Test: m -j RunSettingsRoboTests
Bug: 80243632
Change-Id: I14ece855cf20f9fa44b0648d28f89c0053be5c5f
2018-05-25 22:57:03 +01:00
AL Ho
ae2893db10 Update Accessibility vibration settings.
- Get notification vibration and haptic feedback intensity respectively.
- Use xliffs to compose these strings.
- Use the version that passed in Vibrator.class to get Vibrator
  instance.
- Refactor switch/case part in getSummary() of
  VibrationIntensityPreferenceController.
  Let AccessibilitySettings and VibrationIntensityPreferenceController
  both call it.
- Add robolectric test for method: updateVibrationSummary().
- Refine test method, use real preference and test summary value.
- Remove redundancy.

Bug: 75322064
Test: make ROBOTEST_FILTER=AccessibilitySettingsTest RunSettingsRoboTests
Change-Id: Ia3c7447b1ab1e336b36ad439800b673821417e48
Merged-In: Ia3c7447b1ab1e336b36ad439800b673821417e48
2018-05-11 08:56:13 +00:00
AL Ho
92216ae148 Update Accessbility vibration settings.
- Get notification vibration and haptic feedback intensity repectively.
- Use xliffs to compose these strings.
- Use the version that passed in Vibrator.class to get Vibrator
  instance.
- Refactor switch/case part in getSummary() of
  VibrationIntensityPreferenceController.
  Let AccessibilitySettings and VibrationIntensityPreferenceController
  both call it.
- Add robolectric test for method: updateVibrationSummary().
- Refine test method, use real preference and test summary value.
- Remove redundancy.

Bug: 75322064
Test: make ROBOTEST_FILTER=AccessibilitySettingsTest RunSettingsRoboTests
Change-Id: Ia3c7447b1ab1e336b36ad439800b673821417e48
Merged-In: Ia3c7447b1ab1e336b36ad439800b673821417e48
2018-05-11 11:13:25 +08:00
Doris Ling
d63e19aa1d Fix footer text not translated in Magnification settings. am: b0877b390d
am: 84506b36c5

Change-Id: Iab1c7df7fb56b76f3dcacc13608d23bbdcfeda51
2018-04-23 19:00:53 -07:00
Doris Ling
b0877b390d Fix footer text not translated in Magnification settings.
- pass in the summary res id instead of the actual text when building
the launch bundle for the magnification settings.
- remove the title argument as we are passing the title res already,
which takes precedence.

Change-Id: I4ba624e1d9722aa980ea94c306df9a015a159555
Fixes: 78126057
Test: run i18nscreenshots
2018-04-23 17:07:32 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00