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
- 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
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
- 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
Add ColorInversionPreferenceController,
and remove old control code in fragment.
Change-Id: I773e5aa2d6c9bf6b5140be45ee60567a7ed22318
Fixes: 67997748
Test: make RunSettingsRoboTests
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
- 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
- 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
- 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
Add AccessibilityPreferenceController, which wraps all a11y settings
since they are share common infrastructure for enabling, current value,
and availability.
We add an overlay for OEMs to declare their bundled a11y services.
This is the only list of services that will be possible to enabled via
Settings slices.
Accessibility Slices are built by getting a list of valid services,
and indexing the service names as a key in the Slices DB. When they are
built at runtime, they use the generic A11yPrefController to get the status
and enable/disable the service.
Bug: 67997836
Bug: 67997672
Test: robotests
Change-Id: I66f905bf1c55eecb937945c4675c12bcbc96d698
- Move preference related logic to Controller
- Add settings:controller in xml file
Bug: 73899467
Test: manual
Test: make RunSettingsRoboTests
Change-Id: I3eaccc617c4408f50110bf1f5df3482f491f7393
Signed-off-by: rafftsai <rafftsai@android.com>
Bug: 35219990
Test: Created an accessibility service that crashes, and
then verified that the new status is reflected in
Settings.
Change-Id: I676c8e87f7642366a51b139f46cf8e3094a58d50
This adds two new boolean flags:
config_show_color_inversion_preference
config_show_color_correction_preference
Which whent set to false, will hide the color inversion and color
correction preference items, respectively.
Bug: 62378109
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=AccessibilitySettingsTest
Change-Id: I06eac8e141bd6564495298c6c6544a7b059a4e73
This adds a new boolean flag,
config_show_accessibility_shortcut_preference, which when set to false
will hide the accessibility shortcut preference item.
Bug: 62387367
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=AccessibilitySettingsTest
Change-Id: I3fd941695df1ad89f717f464d2383be909839a3b
Fixes: 12910879
Test: make RunSettingsRoboTests
Also went to Settings -> Accessibility, turned off animations,
and observed that animations stopped. Turned it back on, and
the came back. Also fiddled with the granular settings in
developer options, which behaved as expected.
Change-Id: I189fbc4152d3cdb5ee45562c33f94c739f569c32
For accessibilty settings, both on the main page
and the shortcut picker.
Also now observing settings that could be toggled
by the shortcut, so changes can be reflected immediately
in the settings ui.
Bug: 34621067
Fixes: 70335904
Test: Observe icons in settings and shortcut picker.
Toggling color inversion and color correction now changes
the setting ui immediately.
Change-Id: Id27b6471376059288ff971e5aea72d76078bef36
This is a clean up to action bar menu item pattern, we will use the same
pattern to build search icon on all pages in a later change.
Bug: 68814716
Test: robotests
Change-Id: Iedd3ec263e8ccb63ed75ec7a95b28c00878b1de4
- remove all code that check for the feature flag, and use the new logic
by default.
Change-Id: I7fbe60da84c1c0f35e7241402a71d2bc4cd300e6
Fixes: 64564191
Test: make RunSettingsRoboTests
- Remove additional_system_update pref device_info page, we don't need
it.
- Update keys in xml and Preference controller, and search index
provider.
- Clean up in ScreenZoomPreference, it's anti-pattern to set fragment in
constructor.
- Whitelist 2 that are super hard to remove.
Change-Id: Ibab6e2cb074513042a2ae007d9085aa64046eec8
Fixes: 67852637
Test: uniquePreferenceTest
1. Move getPreferenceScreenResId() from individual subclass to
InstrumentedPreferenceFragment.
2. Removed InstrumentedPreferenceFragment.getTitle() and let the
preference fragments that do not have preference screen set the activity
title directly instead.
3. Removed OptionsMenuFragment as all it does is call
setHasOptionMenu().
- changed subclasses of OptionsMenuFragment to extend from
InstrumentedPreferenceFragment directly.
- none of the exisitng subclasses actually implements the option menu
related methods to provide any option menu. So, the setHasOptionMenu()
call is not added to the subclasses.
4. Update Languages preference title.
- launch the fragment from the preference controller instead of from the
default handling, as we need the title res id at launch time to get it
work properly when retrieving the title from back stack.
Bug: 64564191
Test: blaze-bin/screenshots/android/i18nscreenshots/i18nscreenshots
Change-Id: Ibecdcab32cbaed8bf604ec5ebe0a926b4e489a7d
- Add missing title to preference screen xml so that they will be used to
set the activity title when the fragment is launched.
- Also updated some incorrect preference screen titles.
- Overrides getTitle() in preference fragments that do not use the
preference screen xml.
Bug: 64564191
Test: blaze-bin/screenshots/android/i18nscreenshots/i18nscreenshots
Change-Id: Id72d5ddf18f0962bc484de8bbd847a2e55d6371e
There are many places on Settings that loads an icon provided by an application,
and if the icon is too big it crashes Settings.
This CL creates a helper method used to set an icon in a safe way, and
uses it in a few places (but most likely not all of them).
Bug: 65739885
Test: manual verification with an app providing a 2MB png
Change-Id: Iae2becb6d0ec8893328d9ef1de618f9bd12fa4a0
This is necessary to kill DynamicContentMonitor later
- Removed all logic related to indexing accesiblitysetting from the
monitor class and AccessibilitySetting page itself
- Created a loader to search against A11yServices at runtime
I noticed adding a loader in SearchResultsAdapter is rather manual. It's
something we should consider refactor in the future.
Bug: 64310452
Test: robotests
Change-Id: Iff31aff65ce000991229433f294e2ec69af99da2
Move the summary for the toggled features to a footer.
Make the settings appear as a preference.
Bug: 36780887
Test: Start settings and observe the new UI looks a lot
like the mocks referenced in the bug. Also added unit
test to verify that summary text shows up.
Change-Id: I1d002b194991d0901ecb27198ba5de73bd23a5a9
Per API council review, localized strings should return CharSequence. Changes here
account for the different type returned.
Test: ag/1813674
Bug: 37723508
Change-Id: I7dacab8af48932db031de22835b65eba30393956
Specifically, move colour inversion and colour correction preferences
to the display category if device is color transform accelerated.
Test: Manual
Bug: 36603386
Change-Id: I4f7e4e569f5f358e6e3c705f9df02e0da473a081
Devices without a software-rendered navigation bar will be unable to
use "Magnify with button" as no accessibility button trigger for
magnification can be shown.
In this case, we hide the setting by preventing
MagnificationPreferenceFragment from showing the list of mag
modes, instead launching directly into the PreferenceFragment for
"Magnify with triple-tap"
Bug: 36862906
Test: Manual - Configured marlin to disable the navigation bar and
verified behavior in SUW and Settings
Change-Id: Ie614ec292d7779044274b7c79eaed1df080c0fd1
Adding shortcut on/off switch, improving the service picker,
and adding a switch to enable the shortcut on the lock screen.
Also adjusted setting search code to avoid indexing the
accessibility shortcut aside from the main accessibility settings
page.
Bug: 35872328
Bug: 35219988
Test: Ran in a variety of conditions, ran existing settings test.
Also added basic robo test, verified existing robo tests pass.
Change-Id: I4da9bad74caf96d9c8f3640e7db5417b4ee5d602