Commit Graph

166 Commits

Author SHA1 Message Date
Rhed Jao
41118f33b1 Update a11y recommended timeout api.
Update api name to getRecommendedTimeoutMillis.
Api returns timeout for interactive or non-interactive controls.
Also provide the options for a11y service to specify two kinds of
timeout.

Bug: 111210981
Test: atest SettingsBackupTest
Test: atest AccessibilityManagerTest
Test: atest AccessibilityServiceInfoTest
Change-Id: I37d35796fd72bb4d6628a6bb33b111987f321552
2018-11-09 10:24:07 +08:00
kopriva
dae6ec0db7 Merge "docs: fixing 'mange' instead of 'manage'" into pi-dev am: 14aa42cfda
am: 57adb99451

Change-Id: I477a610e0602e464847c1a1ccb13b21644ee1ae8
2018-10-08 19:30:00 -07:00
kopriva
57adb99451 Merge "docs: fixing 'mange' instead of 'manage'" into pi-dev
am: 14aa42cfda

Change-Id: Id461e2430301c62be5ee76f5046370069cb1a34c
2018-10-08 19:14:44 -07:00
kopriva
82c591b78b docs: fixing 'mange' instead of 'manage'
Test: make ds-docs

Bug: 117449040

Change-Id: I282a2e960bbf722bf3a72dd932e3bf685abb74e5
Exempt-From-Owner-Approval: Docs-only change
2018-10-08 15:57:00 -07:00
Rhed Jao
b11b75ac50 Merge "Spoken feedback when a11y shortcut dialog is shown" 2018-09-17 08:37:11 +00:00
Mathew Inwood
db0657a4f4 Merge "Move some members to the "Q blacklist"." 2018-09-14 13:54:28 +00:00
Mathew Inwood
8c854f86a4 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
2018-09-14 13:18:34 +01:00
kopriva
eac0905c11 docs: fixed instances of typo in 'overridden' am: debd4ee72d
am: 9b641cbc71

Change-Id: I071643e73656a2a17a3c0ab89ffacda9c1bfec80
2018-09-13 15:11:27 -07:00
kopriva
9b641cbc71 docs: fixed instances of typo in 'overridden'
am: debd4ee72d

Change-Id: Idde6240486463dee51cdc27b8cd066a80fb869e0
2018-09-13 14:57:25 -07:00
kopriva
debd4ee72d docs: fixed instances of typo in 'overridden'
This affects several files beyond those mentioned in the bug.

I didn't fix some instances because the files had code
problems that blocked presubmit checks.

Test: make ds-docs

Bug: 37094741

Change-Id: I642f0384fef2b267ebc970bae1b4fb90bae667e7
Exempt-From-Owner-Approval: Docs-only change
2018-09-13 11:40:59 -07:00
Rhed Jao
f78014e7be Merge "Adding a11y ui minimum timeout api." 2018-09-13 01:44:13 +00:00
Rhed Jao
e972881f59 Adding a11y ui minimum timeout api.
Bug: 111210981
Test: atest SettingsBackupTest
Test: atest AccessibilityManagerTest
Test: atest AccessibilityServiceInfoTest
Change-Id: I706d05f9b4a9e2daec06243493989b442be107db
2018-09-12 09:56:58 +08:00
Phil Weaver
ec2b49927e Merge "Change API name for a11y keyboard flag" 2018-09-08 23:20:32 +00:00
Phil Weaver
e05fba4e94 Change API name for a11y keyboard flag
Bug: 113855740
Test: make
Change-Id: Ia41360cb5e2bf5d845027add13dec34bc246f403
2018-09-04 17:08:56 -07:00
Phil Weaver
c2f3d85ef2 Add test mapping for a11y
Also marking a few tests as flaky and fixing a couple
others.

Test: atest in:
frameworks/base/services/accessibility
frameworks/base/core/java/android/accessibilityservice
frameworks/base/core/java/android/view.accessibility

Change-Id: I217329655105ce3fa8d78e74c4d39aadcfcd8362
2018-08-30 15:16:54 -07:00
Rhed Jao
6182af7a6d Spoken feedback when a11y shortcut dialog is shown
Bug: 73901137
Test: atest AccessibilityServiceInfoTest
Test: atest AccessibilityShortcutControllerTest
Change-Id: I002458f3365883214578642cdf4aecdcb392ad46
2018-08-27 12:35:24 +08:00
Kevin Hufnagle
7c58c116c0 Merge "docs: Added units for AccessibilityServiceInfo#notificationTimeout." into pi-dev am: aba234f4d9
am: d5d4da1d0e

Change-Id: Iac2e0ba443ca7a340dee7a39f203ec01cf2bbf72
2018-08-15 13:29:56 -07:00
Kevin Hufnagle
d5d4da1d0e Merge "docs: Added units for AccessibilityServiceInfo#notificationTimeout." into pi-dev
am: aba234f4d9

Change-Id: I687f65d311b5a44b8b045cfaff7d274798e08ec5
2018-08-15 13:16:57 -07:00
Kevin Hufnagle
65f4293f34 docs: Added units for AccessibilityServiceInfo#notificationTimeout.
This field uses "milliseconds" as the time unit.

Test: make ds-docs -j32

Bug: 36949594
Change-Id: Id2e55ed7c96364913bb7ad028798fad5f976d3ca
2018-08-14 18:08:16 -07:00
Mathew Inwood
db7fd6ee9e resolve merge conflicts of 20fcc2eb4c to stage-aosp-master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Merged-In: I9437532ae617eda28aa5ae796563e985cc0ddbca
Change-Id: Ifa50d21fb63b7ac73ab2ddaeebb1e01f535595c7
2018-08-02 17:39:43 +01:00
Mathew Inwood
62992f1bb0 Add @UnsupportedAppUsage annotations
For packages:
  android.accessibilityservice

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: Ic677593dc2d206335275ecbad4d4a1020972ef38
Merged-In: I9437532ae617eda28aa5ae796563e985cc0ddbca
2018-08-01 14:28:00 +01:00
Mathew Inwood
29b2e91bd7 Add @UnsupportedAppUsage annotations
For packages:
  android.accessibilityservice

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I9437532ae617eda28aa5ae796563e985cc0ddbca
2018-08-01 14:21:18 +01:00
Phil Weaver
03a65b04d8 Enhance a11y soft keyboard controller
Allow a11y services to request that the soft keyboard be
shown even when the hard keyboard is attached.

Defer to users who override this behavior, and put things
back the way they were when a service requesting this
behavior stops.

Bug: 31012180
Test: Adding CTS tests in linked CL, ran a11y unit tests,
modified TestBack to use the new flag and verified behavior
with a hard keyboard and verfied that settings behave as
expected when overriding and rebooting.
Change-Id: I530481e102ac376a4506b662862ee1ee74815b40
2018-07-27 12:58:18 -07:00
Phil Weaver
466b71e1a2 Add config value for fingerprint gesture support
Also correcting docs for using the fingerprint gesture
flag.

Bug: 76419487
Test: Verified with a test a11y service that gestures are
not available. Adding a unit test to verify this case.

Change-Id: I90233613777013e8b117a2d94f767be292c80019
2018-04-20 15:53:58 -07:00
Eugene Susla
bd573236f8 [DO NOT MERGE] Sort A11yService#getWindows by layer descending
This is what A11yService#getWindows promises in the javadoc.

Fixes: 71581072
Test: using testback ensure the order is correct
Change-Id: I5038c4de29c60e235b65751f7bd7771ef35eb339
(cherry picked from commit f40da1a884)
2018-04-03 21:36:01 +00: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
Svetoslav Ganov
24c90450fe Autofill compatibility mode.
Autofill helps users fill credentials, addresses, payment methods,
emails, etc without manually typing. When focus lands on a fillable
element the platform captures a snapshot of the screen content and
sends it to an autofill service for analysis and suggestions. The
screen snapshot is a structured representation of the screen content.
If this content is composed of standard widgets, autofill works
out-of-the-box. However, some apps do their own rendering and
the content in this case looks like a single view to the platform
while it may have semantic structure. For example, a view may render
a login page with two input test fields.

The platform exposes APIs for apps to report virtual view structure
allowing autofill services to handle apps that have virtual content.
As opposed to apps using standard widgets, this case requires the app
developer to implement the new APIs which may require a fair amount
of code and could be seen as a processes that could take some time.
The most prominent typs of apps that fall into this category are
browsers.

Until most apps rendering virtual content and specifically browsers
don't implement the virutal APIs, autofill providers need to fall-
back to using the accessibliity APIs to provide autofill support
for these apps. This requires developers to work against two sets
of APIs - autofill and accessibility - which is incovenient and error
prone. Also, users need to enable two plugins - autofill and
accessibility which is confusing. Additionally, the privacy and
perfomance impact of using the accessibility APIs cannot be addressed
while autofill providers need to use thes APis.

This change adds an autofill compatibility mode that would allow
autofill services to work with apps that don't implement the
virtual structure autofill APIs. The key idea is to locally enable
accessibility for the target package and remap accessibility to
autofill APIs and vise versa. This way an autofill provider codes
against a single set of APIs, the users enable a single plugin,
the privacy/performance implications of using the accessibility
APIs are addressed, the target app only takes a performance hit
since accessibility is enabled locally which is still more efficient
compared to the performance hit it would incur if accessibility is
enabled globally.

To enable compatibility mode an autofill service declares in its
metadata which packages it is interested in and also what is
the max version code of the package for which to enable compat
mode. Targeted versioning allows targeting only older versions of
the package that are known to not support autofill while newer
versions that are known to support autofill would work in normal
mode.

Since compatibility mode should be used only as a fallback we
have a white list setting with the packages for which this mode
can be requested. This allows applying policy to target only
apps that are known to not support autofill.

Test:
     cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
     cts-tradefed run cts-dev -m CtsAccessibilityServiceTestCases

bug:72811034

Change-Id: I11f1580ced0f8b4300a10b3a5174a1758a5702a0
2018-02-02 19:34:26 -08:00
Phil Weaver
d0429743fa Add a11y action to take screenshot
Bug: 70392997
Test: Adding unit test for functionality, cts test
for presence of api.

Change-Id: Ib5bc2217e1d29f527db0f0fadb69fd8249d6c279
2018-01-19 15:43:53 -08:00
Jeff Sharkey
ce8db99114 Add more IntDef prefixes for auto-documenting.
Test: builds, boots
Bug: 70177949
Exempt-From-Owner-Approval: annotation-only changes
Change-Id: I76dde6054e06f52240bd4b1a0f196dcb74623608
2017-12-13 20:05:36 -07:00
Svet Ganov
240aed987c Prevent reporting fake package name - framework
Test: added AccessibilityEndToEndTest#testPackageNameCannotBeFaked
      cts-tradefed run cts -m CtsAccessibilityServiceTestCases
      cts-tradefed run cts -m CtsAccessibilityTestCases

bug:69981755

Change-Id: I13304efbee10d1affa087e9c8bc4ec237643283e
2017-12-09 09:04:24 -08:00
Eugene Susla
d4128ec0df Revert "Don't generate irrelevant a11y events - framework"
This reverts commit 8ddfb4794f.

Test: presubmit
Bug: 69975306
Change-Id: I05cb545eb0adc77298dddf2dea2997ef36b58a5f
2017-12-05 13:08:51 -08:00
Svet Ganov
8ddfb4794f Don't generate irrelevant a11y events - framework
Now before we fire an a11y event we check if this event has an
observer. As a bonus we don't push the state to clients if the
dynamic service config did not change.

Test: cts-tradefed run cts-dev -m CtsAccessibilityServiceTestCases

bug:69427760

Change-Id: Ie208e13b8557bb7a120198a43efcb79c2752f5db
2017-11-28 17:58:38 -08:00
Eugene Susla
f9a651d64c Global a11y action to lock screen
Fixes: 25567237
Test: ensure API works using TestBack
Change-Id: I335fd6b44d2c67b53a2c1f6224d16bd798276c8b
2017-11-16 18:41:14 -08:00
Eugene Susla
a55f74e45d Magnification Gestures CTS test
Test: ensure affected CTS tests pass
Change-Id: I2ad9ef57098d1e9343d571e0d59504851ac691eb
2017-10-16 17:31:49 -07:00
Phil Weaver
6f2da205cc Don't call disconnected AccessibilityServices
An AccessibilityService that doesn't have a connection is
not able to access the resources it needs to respond to
callbacks.

Bug: 65367289
Test: Toggle Select to Speak several times, with and
without TalkBack enabled. No longer crashes. A11y unit
tests and A11yService CTS passes.

Change-Id: I03c647cbaf68d5defcc7fbcec1c746af9968bd35
2017-09-05 23:35:57 +00:00
Jeff Sharkey
67f9d5070a Fix broken javadocs.
Bug: 64337634
Test: make -j32 doc-comment-check-docs
Change-Id: I20fdd3dcddef09111d35946c41c596c7689effa6
2017-08-06 07:37:08 -06:00
Casey Burkhardt
921384157d Merge "Fix accessibility button CTS test" into oc-dev 2017-05-01 19:49:13 +00:00
Jeff Sharkey
63827ce61b Merge "Change String to CharSequence in #loadSummary." into oc-dev 2017-05-01 17:52:26 +00:00
Saige McVea
cb75b5454b Change String to CharSequence in #loadSummary.
Per API council review, localized strings should return CharSequence. Also
updated doc.

Test: ag/1813674

Bug: 37723508

Change-Id: I5ae868c2dda64d3756ad477578c65708242fde8c
2017-04-28 20:35:06 -07:00
Casey Burkhardt
2402943ae5 Fix accessibility button CTS test
Ensure accessibility button callbacks are registered with a
Handler that has a valid Looper.

Bug: 37789861
Test: Passing CTS
Change-Id: Idf91547940fe7754bbabe55a729193c4100b8532
2017-04-28 17:09:57 -07:00
Phil Weaver
be2922ff34 A11y changes for API council
Bug: 37749679
Bug: 37747749
Bug: 37737948
Bug: 37718183
Bug: 37720667
Bug: 37724600
Bug: 37708057

Test: Updating unit and cts tests, which still pass.
Change-Id: If28bdf985c4314e8e84dcd6510f406dd4e80dd38
2017-04-28 14:58:35 -07:00
TreeHugger Robot
cfbe105e4b Merge "Rename FingerprintGestureCallback.onGesture" into oc-dev 2017-04-28 03:42:01 +00:00
Casey Burkhardt
a338b51e02 @NonNull on AccessibilityButtonController methods
Make Handler parameter @NonNull and adjust implementation
to always expect non-null Handlers.

Bug: 37709203
Test: Manual
Change-Id: I3937ae1c4e49bfc7652750cc64cac9e78f9d3ce2
2017-04-27 15:19:52 -07:00
Phil Weaver
d7e1fb89d9 Rename FingerprintGestureCallback.onGesture
Renaming to onGestureDetected.

Deprecating onGesture. It needs to be removed for release.
Leaving it in to avoid breaking TalkBack, which is using it.

Bug: 37708057
Test: Accessibility unit and CTS tests still pass.
Change-Id: Icd66889216fc978ad6d27aa83a8c8d13869daad3
2017-04-26 15:20:24 -07:00
Phil Weaver
09d4ff8960 Remove a11y web flags and associated settings
Bug: 35707622
Bug: 28322375
Test: Ran a11y cts. Updated those tests in linked CL to
ignore this feature.

Change-Id: I1dccb3ae4e1f4d6bb832ae1b0edd4dad4a54289e
2017-04-22 01:21:03 +00:00
Phil Weaver
f00cd14f17 Basic accessibility support for picture-in-picture
Exposing actions from the PIP InputConsumer to accessibility,
stripping all actions from a covered PIP app, and adding the
InputConsumer's actions on the PIP app's root view.

We were also using an "undefined" accessibility ID to mean
three different things: a root view, a host view of a virtual
view hierarchy, and a truly undefined view. I've introduced
new values for cases where the id could be defined.

Also gathering all window IDs into one place to reduce the
chance of collisions.

Bug: 34773134
Test: In progress. Current cts passes.
Change-Id: I97269741a292cf406272bf02359c76c396f84640
2017-03-10 15:35:30 -08:00
Saige McVea
08c41bcf5f Accessibility settings refresh.
Categories were added to accessibility service info objects so that they can be grouped
in system Settings. Services can declare a category in their accessibility manifest file,
and if no category is defined, the service is placed under the "Other services" category.

Bug: 30374533

Test: Manually tested with BrailleBack & CTS tests modified to validate proper loading of summary.

Change-Id: I8718556764f2be4a18ce4e80e6bbd4950a41e387
2017-03-06 15:04:00 -08:00
Phil Weaver
e231986368 Revert "Remove abstract from AccessibilityService methods"
This reverts commit 7c01afdd18.

Change-Id: I08990f4fc695b9323051e05a32c35fb9fe426146
2017-02-23 18:51:34 +00:00
Phil Weaver
7c01afdd18 Remove abstract from AccessibilityService methods
Two methods on AccessibilityService were declared abstract, but
there doesn't seem to be a good reason for them to be abstract, as
it's possible to write an accessibility service that doesn't do
anything useful with the methods. Removing the abstract qualifier
to reduce boilerplate for service developers.

Bug: 31705365
Test: Trivial change, so I just verified that it builds.
Change-Id: I2af39848c8ab343d562361fdc1c3f8ca3ecb5f00
2017-02-22 12:54:40 -08:00
Phil Weaver
7917a2f020 Verify fingerprint exists before using it
The process will crash if we try to obtain a FingerprintManager
on a device that doesn't implement one. Verify that the feature
exists before trying.

Bug: 34923693
Test: Ran A11y unit tests and a11y fingerprint cts.
Change-Id: I48ad1c2c9c0c5739d8b1826c3c53bb817078e6cf
2017-02-16 20:21:15 -08:00