* Need to be used in 'Connected device' page for hearing aid device
Bug: 225117933
Bug: 227172850
Test: make RunSettingsRoboTests ROBOTEST_FILTER=RestrictedPreferenceHelperTest
Change-Id: Icda456aa9c7597dc113775d1359acb0a8430768c
Bug: 202130031
Test: Able to boot without error
Test: When app is installed by PackageInstaller app, notification
access is being restricted. The restriction is being removed after
turing it restricted settings off for that app.
Change-Id: I9c1fbc80dd2ca4cc483a60dfa9d043aaa99cde87
If OP_ACCESS_RESTRICTED_SETTINGS is rejected, it means accessibility page
for that app is gray out and app info won't show "unlock restricted settings menu"
If OP_ACCESS_RESTRICTED_SETTINGS is ignored, it means accessibility page
for that app is gray out, but app info shows "unlock restricted settings menu"
If OP_ACCESS_RESTRICTED_SETTINGS is allowed(default), it means users can
access accessibility page for that app.
OP_ACCESS_RESTRICTED_SETTINGS will be changed to ignored if user visited
the restricted settings dialog.
OP_ACCESS_RESTRICTED_SETTINGS will be changed to allowed if user passes
the confirmation screen.
Bug: 202130031
Test: Tested the UI and it works correctly
Change-Id: I3dfb94cee440658b4726a1c3f7265f93cd19ed3e
Refactor SettingsContentObserver and rename it to
AccessibilitySettingsContentObserver. Besides, we register it to observe
follow typing feature preference value.
The reasons behind refactor:
1. We change callback signature due to the consistency for register it
by preference key, not by Uri.
2. We refactor the default preference key to a seperate method. Since
the default value is related to accessibility, we rename it with
accessibility prefix.
3. We can register different callback for difference collections of
preference keys.
Default preference keys: They existed in the previous constructor.
1. Settings.Secure.ACCESSIBILITY_ENABLED
2. Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES
Bug: 194668976
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
AccessibilitySettingsTest
AccessibilitySettingsContentObserverTest
AccessibilityShortcutPreferenceFragmentTest
MagnificationFollowTypingPreferenceControllerTest
ToggleFeaturePreferenceFragmentTest
ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: Iafd27e044ebe2536ae7ae55c1c80af54f7f0f822
Updating the Settings app to allow setting the value off for key
HAPTIC_FEEDBACK_INTENSITY. This setting state is also copied onto
HAPTIC_FEEDBACK_ENABLED setting, so both should be in sync after this
change.
Similar logic is applied between RING_VIBRATION_INTENSITY and
VIBRATE_WHEN_RINGING.
This will not disable the hardware feedback since that one is controlled
by a separate setting key now.
The "vibrate for calls" was also removed and the single toggle for
"vibrate first then ring gradually" was moved into the "Vibration &
haptics" page.
Bug: 185351540
Test: [HapticFeedback|NotificationVibration|RingVibration][Intensity|Toggle]PreferenceControllerTest
and manual testing of the AOSP settings app
Change-Id: I9c94cef331a1500a1272a601ba32667ca995ddab
This configuration should be user-scoped.
Bug: 184165158
Test: AccessibilitySettingsTest
RingVibrationPreferenceFragmentTest
VibrateForCallsPreferenceControllerTest
VibrateForCallsPreferenceFragmentTest
Change-Id: I7b8684fb1cf03d41872a700fd8732c76422e37c3
* Use FeatureFactory to improve the search only for google overlay
Bug: 184171842
Test: atest AccessibilitySettingsTest
Change-Id: I93ed52d2579b7da35dba59f9562b6715d13dd80d
Root Cause: Keys in ContentObserver registered after the keys change
Solution: Keys in ContentObserver need to be observed during the whole lifecycle to update the preferences including summary text
Fix: 183157677
Fix: 172469017
Fix: 183459237
Fix: 183459376
Test: atest AccessibilitySettingsTest
Change-Id: I3b22773965f1878c499a0f9cbd8bd0f3c9c6fae9
This is a transitional step towards truth 1.0.1, where these APIs have
been completely removed.
Bug: 168765701
Test: m checkbuild
Change-Id: I76f9c37cb699ce6ab8715ffe35d11668ccbceea1
* 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
* Reduce the complexity of updateServicePreferences.
* Introduces RestrictedPreferenceHelper to setup installed
AccessibilityServiceInfo and AccessibilityShortcutInfo.
Bug: 142531433
Test: make RunSettingsRoboTests
Change-Id: I0f5eeac56a93caadeb05c25f1f8c4daa0d775b35
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
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
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
The resources available to tests are now exactly the merged resources
located in the APK under test.
Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
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
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
- 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
This allows Settings to test against the latest framework changes.
Also replaced TestConfig with traditional robolectric.properties.
Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
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
Previously everything lived in an inner class method of
SettingsRobolectricTestRunner. That method has now been turned into
a static method so that it can be called by other runners.
Bug: 62460102
Test: robotests
Change-Id: I6612b1f26404587301c534c8ba60e39d59d6c840
Disabling the shortcut if no service is configured, so we
users won't see an "On" unless the shortcut will have an
effect.
If no service is configured and the user tries to enable
the shortcut, the service picking UI is shown. If the user
chooses a service, the shortcut turns on. If not, the
shortcut remains off.
Service selection is disabled when the shortcut is disabled
(except for the specific case above).
Lock screen behavior selection is disabled when the shortcut
is disabled.
Also updating a couple of strings based on UX input.
Adding an AOSP header to a file that somehow got checked in
without one.
Fixes: 37443184
Fixes: 38030853
Test: Manually went through the various combinations of
shortcut on and service enabled. I turned off the default
selection of TalkBack as the shortcut service to ensure
that we show a dialog when no service is selected.
Change-Id: Iac5cff12edea91a496fc81781518db4ae49ef334