Commit Graph

12 Commits

Author SHA1 Message Date
Fan Zhang
105908d04c Fix StringIndexOutOfBoundsException in AccessibilityUtils
The string splitter is a sigleton but the access is not thread-safe. So
now it's changed to be a local instance to avoid threading problems.

Also removed a few unused test classes as clean up.

Change-Id: Ia2b3f3058fcbb0b28afff4e3d1b29184072bf45e
Fixes: 110255579
Test: robotests
2018-06-18 10:09:23 -07:00
Phil Weaver
c09a021987 Expose if running a11y service has crashed
Using a hidden variable to communicate this for enabled
services. Used in Settings to report the current status.

Fixes: 35219990
Test: Adding unit test to verify that crashed value is
populated correctly. Run a11y unit and cts tests.

Change-Id: Ia47a8bd1d750186c504758df21e05a8a76c285cb
2018-03-13 09:54:28 -07:00
Phil Weaver
bbb6063a53 Removed obsolete a11y support for ClickableSpan
Since we now support ClickableSpan accessibility natively,
we no longer need elaborate workaround for them. The helper
had its own issues, since it meant that some TextViews were
presented completely differently to accessibility than
others (thus the bug that led me here.)

Bug: 37363351
Test: Verified that Select to Speak can now highlight the
footer text in Settings properly. There is already a CTS
test for the ClickableSpan support.

Change-Id: I5dd4fb745c2c994099ca6c3332beff9a58227359
2017-05-10 15:59:51 -07:00
Casey Burkhardt
ad217d1f86 Refactor accessibility button support detection
- Moves logic to detect devices capable of supporting the
  accessibility button into AccessibilityManager from
  SettingsLib to avoid issues with resource shifting in the
  SUW binary

Bug: 37650567
Test: Existing Robolectric / Manual
Merged-In: Ibb2aaa3c2f79570df768cfa796fa890988ef82cc
Change-Id: I83bbecdf7836ae0de32ce7d39155ac0c111a8f15
2017-05-01 15:53:17 -07:00
Casey Burkhardt
f00fd2069e Shows navbar in SUW if the a11y button is requested
Adds a utility class to detect the state of the accessibility
button.

Test: Robolectric tests in 2110420 to verify behavior.
Bug: 37295649
Change-Id: I25828a0daaeb7f0048fe63741bc929ffac084336
2017-04-17 12:47:45 -07:00
Phil Weaver
ce687c5e4a Restructure a11y shortcut settings
Separating the shortcut on/off from the shortcut service.
Enabling the shortcut to work from the lock screen if the
user wants it to.

Bug: 35872328
Bug: 35219988
Bug: 35443593
Test: Adjusted tests for shortcut controller, manually
activated shortcut in a variety of conditions.
Change-Id: Id39d33ec62eb5f11b76b2972089167dc7d4c625b
2017-03-22 16:36:12 -07:00
Salvador Martinez
2613bf2cef Moved LinkTextView to settingslib
This View is being used by several projects and so
I moved it to settingslib so there are not multiple
copies floating around.

Test: Manual & robotests for projects that use it
Bug: 34621372
Change-Id: I8d51a1b5383fad977754eeeb78dce545e506be04
2017-01-25 10:49:11 -08:00
Phil Weaver
106fe73205 New accessibility shortcut.
Removing accessibility gesture from power dialog.

Adding new accessibility shortcut activated by holding both volume
buttons down. This shortcut is configurable by OEMs and users to
work with any installed accessibility service.

Bug: 30160335

Test: Added automated testing for the EnableAccessibilityController.
Manually toggled various services on and off.
Change-Id: I546bd29a2ab1ba64a0cbfd11e2004cdf85ee6cfd
2017-01-18 17:12:54 -08:00
Tony Mantler
d48e0d44f6 Remove redundant twiddling of Settings.Secure.ACCESSIBILITY_ENABLED
This is handled by AccessibilityManagerService now

b/27477156

Change-Id: Ib55d753ec0bd07764780a126be4bb8e4a406d22d
2016-03-09 14:28:25 -08:00
Muyuan Li
19df1284d9 Making AccessibilityUtils interface multi-user aware
The getEnabledServices and setAccessibilityServiceState now have an
overloaded version to take in a userId parameter.

Bug: 27383941
Change-Id: I3ea648fd5f22cd2e9402686b83ca42976b5306f8
(cherry picked from commit 2d1c0154b1f9aeeb991dc96efb29aa53c76f4957)
2016-03-07 19:08:04 +00:00
Tony Mantler
5fb3a7f666 Move more Accessibility stuff to SettingsLib
Change-Id: I081bffea6ff4da455f9040fc3f45198d1de85d26
2015-10-30 16:20:25 -07:00
Tony Mantler
5789c3e24f Move AccessibilityUtils to SettingsLib
Change-Id: I99eeb79b03e56a0150a8dbebc3cc5c292ad9bcfe
2015-10-29 13:17:06 -07:00