Commit Graph

178 Commits

Author SHA1 Message Date
mincheli
7ab28d5126 Add null check for AccessibilityButtonController.isAccessibilityButtonAvailable
Just add a null check to reduce NullPointerException happening.

Bug: 110361782
Test: Test: a11y CTS & unit test
Change-Id: Ia4e39c5b3af4943fba2f9ad545b96d5983ee780d
2019-03-21 11:22:03 +08:00
Jeff Sharkey
9e8f83db6d All Parcelable CREATOR fields are @NonNull.
If they were null, then the Parcelable would fail to work.

Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
2019-02-28 23:29:04 -07:00
Phil Weaver
f1c246619f Merge "Add owners for accessibility" am: bbbeba3c02 am: a525ea4436
am: c36e36b87e

Change-Id: Iaa5653b02e99a149186a99f3fda28111263aa2ad
2019-02-11 17:12:54 -08:00
Phil Weaver
c36e36b87e Merge "Add owners for accessibility" am: bbbeba3c02
am: a525ea4436

Change-Id: Ia828c34be1f1dac6ea58ce0e68cf032f058dbb0b
2019-02-11 16:53:13 -08:00
Phil Weaver
6ac1a60bf1 Add owners for accessibility
Test: Relying on treehugger. No functional changes.
Change-Id: I2511b04e56301bd34a8eaced7be8dd8582cc3cc7
2019-02-07 10:52:13 -08:00
Rhed Jao
02655dc38c Enable multi-display support for magnification controller
1) New api for a11y service to specify display id and return
per display magnification controller.
2) Updae MagnificationController to support multi-display.
3) Update AccessibilityController to support multi-display
magnifier.

Bug: 112273690
Test: atest MagnificationControllerTest
Test: atest MagnificationGestureHandlerTest
Test: atest CtsAccessibilityTestCases
Test: atest CtsAccessibilityServiceTestCases

Change-Id: I643a8f96e7d57f729daf8df7f26c9014b1dfd476
2019-01-18 16:53:32 +08:00
Gilbert Lee
0b2f7babbb Merge "Adjust maximum accessibility magnification scale from 5x to 8x" 2019-01-14 02:34:29 +00:00
Gilbert Lee
d38d699054 Adjust maximum accessibility magnification scale from 5x to 8x
Bug: 76414773
Test: Manual
      atest FrameworksServicesTests:com.android.server.accessibility

Change-Id: I558c641bc65ba07a6544d439c8616a7e5d6960b4
2019-01-08 13:04:27 +08:00
Rhed Jao
637c416153 Accessibility timeout: Update integer range to APIs
Bug: 120475200
Test: atest AccessibilityServiceInfoTest
Change-Id: Idd954ab61f5d2511cfdcdabaf2527f99f93c80fc
2018-12-24 16:06:40 +08:00
Xin Li
15b123ef45 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Idc8bfb6d97a869b76cfb87ca1a494201baf9e8bd
2018-12-11 14:13:44 -08:00
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
Nathan Harold
41e2d7494f Merge "Move some members to the "Q blacklist"." am: f5cf9f24ed
am: 13c9e7e2f3

Change-Id: Ia2419cce28d26d9464da2a5172cb332b629e943e
2018-10-24 16:14:06 -07:00
Mathew Inwood
45d2c252b1 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
Merged-In: I719b5c94e5b1f4fa562dd5d655953422958ad37e
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
(cherry picked from commit 8c854f86a4)
2018-10-22 17:28:24 -07: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