Bug: None
Test: I solemnly swear I tested this conflict resolution.
Merged-In: I9437532ae617eda28aa5ae796563e985cc0ddbca
Change-Id: Ifa50d21fb63b7ac73ab2ddaeebb1e01f535595c7
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
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
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
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
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)
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
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
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
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
Per API council review, localized strings should return CharSequence. Also
updated doc.
Test: ag/1813674
Bug: 37723508
Change-Id: I5ae868c2dda64d3756ad477578c65708242fde8c
Ensure accessibility button callbacks are registered with a
Handler that has a valid Looper.
Bug: 37789861
Test: Passing CTS
Change-Id: Idf91547940fe7754bbabe55a729193c4100b8532
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
Bug: 35707622
Bug: 28322375
Test: Ran a11y cts. Updated those tests in linked CL to
ignore this feature.
Change-Id: I1dccb3ae4e1f4d6bb832ae1b0edd4dad4a54289e
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
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
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
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
This allows an AccessibilityService to set a flag in its
AccessibilityServiceInfo that triggers the navigation bar to show an
Accessibility Button and observe callbacks when the button is clicked
or there are changes in the visibility of the navigation bar.
Test: Manual (Created a sample AccessibilityService) + CTS
Bug:29231271
Change-Id: I03d653d85bc37df28ed71d8bba94b7c75fe56e43
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
We're adding a dedicated volume level for accessibility. Services
can use the new flag to request that this volume be activated for
accessibility usages.
To let AudioManager know when the request state changes, adding a
hidden convenience method to check if any active service requests
the a11y volume stream. This method can be used to enable the
stream and to decide when to show the UI to change its volume.
AudioManager wanted a listener for changes to this flag, so rather
than add yet another special-purpose listener, I've added one that
gets called back whenever there are state changes in a11y services.
These changes happen infrequently enough that we shouldn't need
more targeted methods.
Bug: 30448020
Bug: 27899567
Test: Adding CTS in linked CL.
Change-Id: Ifc53314dc7d9a6ee3d50b04ebcc1a87280cafa5e
Bug: b/32642665
Test: Steps:
- Retrieve root AccessibilityNodeInfo
- Change text on its child TextView
- Wait for a few seconds to let the AccessibilityEvent propagate to
the AccessibilityCache
- Get the child AccessibilityNodeInfo from the root, corresponding to
that TextView, and ensure that it's updated to reflect the text
change
Change-Id: Icbdb91803b646fa06aaf11996d350f6f65c1e809
Changing the service side to accept descriptions of
motion events, not motion events themselves, so we can
control their creation.
Bug: 30647115
Change-Id: Ia6772a1fc05df91818e3f88959d1e2b4a35fe0cc
Services that declare that they can control magnification,
but never actually make a change or register a listener
waste cycles as we compute magnification data they never use.
Avoid registering for magnification callbacks unless magnification
gestures are enabled, a service is listening for magnification
changes, or a service has changed magnification.
Bug: 28425922
Change-Id: I114a833669bd53b2cd757c94ea52b65a2f838a08
This API was using a oneway aidl call, which meant that the
service was disabled some time after the method returned. That
confused tests that were turning a service off during tearDown
and then turning it back on again in setUp.
Bug: 28621277
Change-Id: I75984df0613bdbb1bc876e2a15caf59106027337
Clarifying region used for magnification as "magnificationRegion",
both in the public API and in the code. There's been significant
confusion about what "magnfifiedRegion" means. Removing
"availableRegion" from everywhere except where it's required, as
that region was identical to magnified/magnification region.
Trying to shut down magnification was a complex situation where
animations in progress and new magnification requests were tricky to
handle correctly. It was not possible to guarantee that the
magnification callbacks were unregistered consistently. There were
at least two situations that led to phone restarts:
1. If a triple tap was detected between unregistering the callbacks
and shutting down the input filter. In this case the magnification
request would go through.
2. If an animation had just started when magnification was turned
off, so the current magnification was 1.0 but the animator was
about to change it. In this case the callbacks would be unregistered,
and then the animator would start changing the magnification.
This change makes registering and unregistering magnification atomic.
It also makes MagnificationController stick around indefinitely once it
is created, registering and unregistering as needed to support
magnification gestures and services that control magnification. Services
that merely query the status of magnification no longer register for
callbacks.
One part of shutting down is turning off the animation and guaranteeing
that it won't try to make further changes. Adding a flag to
SpecAnimationBridge and a lock in that class so we can guarantee that
nothing happens when we aren't registered for magnification callbacks.
Also reconfiguring all accessibility options when a service stops to
make sure that only the features required by the current configuration
are enabled.
Bug: 27497138
Bug: 27821103
Change-Id: If697cbd34b117d82c8eee1ba7d0254089ee4241d