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
The bug I'm fixing is kind of weird, but in the trace it
showed lock contention with onWindowsForAccessibilityChanged
holding the lock for a long time. So I've cleaned up that
method a bit, looking for trouble. The only concrete thing
I see that's wrong is that I was clearing a11y focus, which
involves calling the app that last reported having focus.
That was done with the lock held. Now doing it through the
handler.
Bug: 77298850
Test: Ran a11y CTS and unit tests.
Change-Id: I667707412a0e3ba98639d0cb43858e8c6b52a5a7
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 f40da1a884493b6af61e3b978fdf7c7ff059b2dc)
DISALLOW_DEBUGGING_FEATURES is set
(adb unroot first)
Test: Turn on DISALLOW_DEBUGGING_FEATURES in work profile.
Can dump personal window + Cannot dump work window by using
adb shell uiautomator dump
Test: Turn off DISALLOW_DEBUGGING_FEATURES in work profile.
Can dump window in both profiles
Test: atest CtsAccessibilityServiceTestCases
Test: Enable talkback, try launching a few apps and interact with them.
Fixes: 73147467
Change-Id: I044a1546f9b568b0d19714154d6e7e5ab7232d26
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
Accessibility services can't see non-touchable windows,
so those windows should not be allowed to have
accessibility focus.
Bug: 70986605
Test: Manually went through bug steps, verified that
double-tapping on the screen has no effect.
Change-Id: I7be72331c5704f7aa99714a01bbb2e336eea15e1
Pooled lambda change dropped the argument.
Fixes: 73889458
Test: Turn on TalkBack, select things in different
windows, observe that focus clears in one window
when it is set in another.
Change-Id: I9755ffbce1b5305a24f5b9ac7b8f59069c917995
These crash the system. Resetting and trying to muddle
through seems like a better solution than restarting
the device.
Bug: 68269250
Test: make, try TalkBack a bit. The crashes were so rare that
the code I'm changing *almost* never executes.
Change-Id: I7931417832cb2ce39de5c8b00312c12354d76803
1. Added missing defensive copy for a MotionEvent that is posted
asynchronously with delay, and thus might get recycled
2. Fixed transitioning to viewport dragging on 3tap/shortcut+swipe
Test: manually ensure the fix is working
Bug: 73359125
Change-Id: Iae8cd3a83512ee363abe9f0b5702287d7616c092
The single usage we had was already mostly guarded by lock -
replaced with a regular list to prevent confusion
Fixes: 71795155
Test: atest CtsAccessibilityServiceTestCases
Change-Id: I1c3235aadb0db4907cbe92a17cc58d2c8a8b5564
Add @GuardedBy for simple functions that require a single lock
and are named XYZLocked.
Derived by errorprone.
Bug: 73000847
Test: m
Test: m javac-check-framework RUN_ERROR_PRONE=true
Change-Id: Id1d9fbe5018250e3b9d1466fc5f670d5ad902fa3
Fixes: b/69307379
Test: Ensure attached bug no longer reproduces.
Ensure magnification using a11y button otherwise works as expected
Change-Id: Ie4e966eb8cfcc9d3f37ae7252b951381ef1fb7c7
TYPE_WINDOWS_CHANGED events have meant that "something"
changes with the system windows, so a single event would be
fired for a single small window change or a bunch of window
changes. Services were required to cache the windows and
compare the old ones to the new ones to find out what
changed.
Since AccessibilityEvents are intended to communicate
changes to the UI, this CL sends one TYPE_WINDOWS_CHANGED
for each window that has changed, and provides a way to
get the source of the changing window. It also adds a
windowChangeType field, which contains flags to indicate
what exactly has changed for the window.
Bug: 62231686
Test: Run all a11y unit and cts tests
Change-Id: I6c48e74da26be5ea485ac114a37f3c404a74940e
This change adds a special flag when binding to a service to request
instant apps to be considered as well (assuming the caller has the
permission to see instant apps). This flag is scoped only for the
platform to use and is intended only for development and testing.
Specifically, we have a class of CTS tests that has tests plus service
in the same APK (accessibility, printing, autofill, any other plugin
based sub-system).
Instead of doing the tediuous work split all these into one APK with
tests and one with the services where the latter exposes a remote
interface to the former, we will be adding shell commands to the
dedicated sub-system to allow temporary binding to plugins provided
by instant apps. The goal is not validating the plugin behavious,
rather a working plugin is required to test app side funcionality.
This change adds a shell command to allow the a11y manager serivce
to bind to plugins provided by instant apps. This is required to
be able to run relevant CTS test cases in instant mode.
Test: cts-tradefed run cts-dev -m CtsAccessibilityTestCases
cts-tradefed run cts-dev -m CtsAccessibilityServiceTestCases
Bug: 70978575
Change-Id: Ifced735a9a6e495747372dd8b00fdd64933a09c7
Together with checking isObservableEventType this will result in a11y events
not being generated for packages that are excluded form a11y-service(s)
package whitelist
Test: cts-tradefed run singleCommand cts -d --module CtsAccessibilityServiceTestCases
Change-Id: Id65607aaccc7af7d870d009d609917ff3c6d0712
The anchors are, in practice, always Views, but they may end up
being virtual views in the future, so we should have this done
right.
Also cleaning up picture in picture mode. I don't know why I made
it a separate boolean when I already had the boolean properties.
Bug: 70730136
Test: A11y unit tests and CTS
Change-Id: I916ec066dff12fab8b586371452b728af6be1271
CTS tests are now throwing security exceptions for accessibility actions.
This reverts commit 19eb58959b2b9cbf0d082ddc0640a6da99c8a3dc.
Change-Id: I2027ee4cca0fcc2b38bb615a58d992ef309e2d70
Bug: 63907873
Test: manually tested that the app op is being logged for TalkBack and a 3rd party accessibility service. Ran UIAutomator-based tests to check that they work as expected.
Change-Id: I1a40d4ead52ba2258cc7ddc8be594a13895d8340
When the binder died, the system wasn't finding out,
so it got into an inconsistent state and told client
apps that accessibility wasn't enabled when it actually
was.
Also fixing dumping of uiautomation, which was failing
with an NPE.
Fixes: 70338333
Fixes: 70227110
Test: Repro case in 70227110 no longer fails.
Ran a11y and UiAutomation CTS.
Ran a11y system server unit tests, and added one to verify
the new behavior.
Change-Id: I4fa6067f8316114a925de86d3fac611e6196da3e
Fix: 70585244
Test: Enable any accessibility service -> inflate work profile
-> Tap on any work app -> no longer crash
Test: cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.CrossProfileAppsHostSideTest.testPrimaryUserToManagedProfile
Change-Id: I80d18f4e2ab76a228cb0aa2c8312c323a9b5c84d
Bug: 63907873
Test: manually tested that the app op is being logged for TalkBack when it's being registered as an accessibility service.
Change-Id: I10f36a86067950ef57c7afc7bf2f01efff46689c
See build/soong/README.md for more information.
Test: m checkbuild
Exempt-From-Owner-Approval: trivial conversion
Change-Id: I417409281c928ea667d937090d2a0d9d72a449a2