If the volume keys are being pressed to enable or disable
an accessibility service, the key events should not be
dispatched to accessibility services.
Bug: 62653966
Test: A11y CTS and unit tests. Adding a set of unit tests for
the expanded KeyboardInterceptor. Also verified that the
accessibility shortcut now works as designed with TalkBack.
Change-Id: Iaea58a5bfe6748d4b9a033f5b957e78298881c40
Bug: 62862624
Test: Enable magnification, then enable TalkBack with the
a11y shortcut. Verify that volume keys work.
A11y service CTS, a11y units tests.
Change-Id: I729ab17d24f758b5ce534ffde43d2126a1f9536c
- Unify logic for detecting availability of the accessibility button
- Ensure the initial visibility state is propagated to A11yMS
- Ensure services only receive availability callbacks for changes
Test: Manual, created test accessibility services
targeting specific breakages
Bug: 38345417
Change-Id: I2250b32830cdfc2ecdc1dff7b7130dced2c1db29
This mostly rolls back ag/710190, which caused
AccessibilityEvents to contain their source nodes. These
nodes were not completely accurate, and populating them
increases the overhead of AccessibilityEvents, particularly
when large numbers of content changes happen. Having the
service reload the node if it needs the update content
should be sufficient. I have fixed several bugs since this
change went in to address issues with the accessibility
cache containing stale data. I think ensuring that the newly
loaded data is up-to-date will fix whatever issues carrying
the node along was intended to fix.
Bug: 33961523
Test: A11y CTS still passes. I also tried TalkBack on a
couple of switch controls, which is where I have previously
seen the most issues with up-to-date announcements.
Change-Id: Ie5a70bb0e89d49255c6a4c1c83d32b755c06902f
We need to straighten out this state machine so we can
fix bugs in it without a high risk of creating others
(b/38246304). In the meantime, catching this exception at
least allows the device to keep operating.
Bug: 37338581
Test: Reproduced the conditions of the crash. Verified that
we now print the log message.
Change-Id: I1f4f84b5529b2bf638e225d474808e3d42484e78
When we strip and replace actions for UIs inside a picture-
in-picture window, make sure attributes match. For example,
if an node was clickable and exposes ACTION_CLICK, when
removing actions we must clear both the click action and
the clickable attribute.
Bug: 37923645
Test: Updating unit tests
Change-Id: I84de5cae136bccb20b2234aef59bf5e0a7c15949
Bug: 35707622
Bug: 28322375
Test: Ran a11y cts. Updated those tests in linked CL to
ignore this feature.
Change-Id: I1dccb3ae4e1f4d6bb832ae1b0edd4dad4a54289e
Test: Run a instrumentation test
cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.ManagedProfileTest#testPhoneAccountVisibility
Change-Id: I29b1dc307e9e127b919aebe4d83ab6311ce36f2d
Fix: 34320197
- Ensures NavigationBarFragment updates Accessibility button state
based on the settings of the current user.
- Launches AccessibilityButtonChooserActivity as the current user
Bug: 36652061
Bug: 36699310
Bug: 37103953
Test: Manual
Change-Id: Ieded484d548fb4631ceb8a873d667dd53fd2fd79
1) Switch AccessibilityButtonChooserActivity to non-exported
2) Update AccessibilityButtonChooserActivity's intent action to
be CTS-compliant
3) Switches to correct permission to validate a click of the
accessibility button originated from the status bar service
Bug: 36866328
Bug: 36976440
Test: Manual / Created app to validate launch protection
Change-Id: Ifcd5e8dbbe683dc99bb900a5870a9ba374fbd5d4
AccessibilityManagerService#getEnabledAccessibilityServiceList
had an optimization to always return the same, statically
allocated object. This is almost safe if it's being called
from another process, as Binder will copy it. When called from
the same process, however, it's a lot less safe and seems to
have caused a crash.
I think the optimization was already problematic in Binder
calls as well, though. The method grabs a lock, but I think
it's still possible for another thread to call the method
while Binder is making the copy.
I'm removing the optimization and just allocating a new List
to prevent such crashes.
Bug: 36364829
Test: No repro case, so I just ran a11y CTS and unit tests.
Change-Id: Ib64703a7bbed82c6ca000d8703d23819188b4b9b
This change introduces new methods on DumpUtils that can check if the
caller has DUMP and/or PACKAGE_USAGE_STATS access. It then moves all
existing dump() methods to use these checks so that we emit
consistent error messages.
Test: cts-tradefed run commandAndExit cts-dev -m CtsSecurityTestCases -t android.security.cts.ServicePermissionsTest
Bug: 32806790
Change-Id: Iaff6b9506818ee082b1e169c89ebe1001b3bfeca
Prevents AccessibilityManagerService from providing duplicate
accessibility service records to clients calling
getEnabledAccessibilityServiceList if a service contains more
than one feedback flag.
Bug: 36493113
Test: Behavioral CTS test
Change-Id: I2f836e15fdd70543bc8aa9a5602330b0b6846fec
Adding new permission for changing accessibility volume
to allow system UI to change it. Also providing audio
manager with a whitelist of bound accessibility service
uids so it can allow servics to change the volume.
Bug: 36569297
Test: Adding CTS test in linked CL.
Change-Id: I4f327e3a251fc3780c5957f41217c2ef5bb8b16e
Allows for selecting a single accessibility service or feature
to be triggered by the accessibility button in the navigation bar
Bug: 34720082
Test: Manual
Change-Id: I320febede0398b1eff38a87d4db31fd7dfc53062
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
Adds support for invoking display magnification by first selecting
the Accessibility Button, then touching an area of the screen to
magnify.
Bug: 30960346
Test: Manual
Change-Id: Ifd8a355562f204182e34bd37f71a3637d85cf0e1
This allows to avoid A11yManager -> A11yManagerService IPC, when there's no
subscribers to a given event
Test: steps:
- Enable A11yManager.DEBUG
- Navigate through a few random activities
- In logcat, ensure log messages are present, notifying that certain events
won't be dispatched
Change-Id: Ia019fb66053f10095b3651407d09de8e89cdd227
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
Explore-By-Touch has been dispatching touch events to the screen
rather than using the accessibility API. This was intended as a
workaround for apps that did not properly handle accessibility,
but the workaround itself has been causing bugs in corner cases
where properly accessible Views are partially covered by windows.
This CL first tries to dispatch a click action, and falls back on
the touch dispatch only if the click action fails.
Bug: 35200501
Bug: 26216304
Bug: 20665958
Bug: 34949365
Bug: 34844480
Bug: 29535082
Test: Poking around with first party apps and TalkBack works fine.
This behavior isn't covered by automated testing.
Change-Id: I9cc18399d8f40f7381dfcbef91b5991b711bb7f1
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
This introduces an API for apps that support companion devices to provide a
more streamlined flow for pairing and setting up the device
Bug: 30932767
Test: Using a toy app, invoke the newly introduced API (CompanionDeviceManager),
and go through the flow. Ensure filtering works, and device is returned to
the calling app. Ensure the calling app can pair to the selected device.
Change-Id: I0aeb653afd65e4adead13ea9c7248ec20971b04a
- Introduced TYPE_APPLICATION_OVERLAY window type. Can be used by apps
to display windows on top of other app windows, but below critical
system windows.
- Deprecate alert window types TYPE_PHONE, TYPE_SYSTEM_ALERT,
TYPE_SYSTEM_OVERLAY, TYPE_PRIORITY_PHONE, and TYPE_SYSTEM_ERROR.
Apps should now use TYPE_APP_OVERLAY for this.
- Apps targetting O or greater are not allowed to add the old alert
window types.
Apps targetting less than O can still add the old types.
Apps with permission INTERNAL_SYSTEM_WINDOW (system signature apps) can
still add the old types.
- Z-order old alert windows types below TYPE_APPLICATION_OVERLAY if
they are added by an app without the INTERNAL_SYSTEM_WINDOW permission.
Test: android.server.cts.AlertWindowsTests
Bug: 33256752
Change-Id: I12170955a7a333151d3387c169b51c53c32164fc
This fixes a bug I introduced in ag/1444443 as the result
of missing a comment.
Bug: 34077911
Test: Manually verified that EBT is no longer broken
Change-Id: Iec7484c515f8b08ab2e04b4f513629cb6509ab7a
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
Also adding same robustness to interrupt that we have for
sending a11y events.
Bug: 32507871
Test: Ran a11y CTS. Verified manually with sample app
that sends interrupt and accessibility service that
crashes when started. That case used to crash the
app, and doesn't anymore.
Change-Id: I5cf05dcbb54ea23ae876cb3258dd206c55dce775
(cherry picked from commit 867ad35d9c676b5ba2047b0fc9a4006737e5c4aa)