| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a follow up CL to our previuos CL [1], which enabled
AccessibilityService to use a subset of InputConnection APIs.
In that CL we have reused existing AIDL interfaces that were designed
and maintained for IMEs for simplicity, where a non trivial amount of
unnecessary IPC endpoints were included.
From the security and maintainability viewpoints, however, exposing
unnecessary IPC endpoints is discouraged in general. To address such
concerns this CL introduces a set of dedicated IPC definitions for
A11yIME so that we do not need to reuse IPCs for IMEs.
This CL also stops passing InputBinding object to A11yIME process as
it contains IInputContext Binder Proxy, which can still be used to
directly invoke fallback InputConnection. This is doable now because
A11yIME no longer relies on fallback InputConnection [2].
This CL is should not have any observable changes in the semantics.
End-to-end CTS tests guarantee that everything is still working as
intended now and in the future.
[1]: Ia651a811093a939d00c081be1961e24ed3ad0356
fb17e5ae7a9e1a095d114d8dde76f14578b6c233
[2]: I2af3cd50444d8ddf25aa0f6479238156914e6fff
dc635efb687ac04045f2756b02c5ca2435762956
Fix: 215633021
Fix: 215636776
Test: atest CtsInputMethodTestCases:AccessibilityInputMethodTest
Test: atest CtsAccessibilityServiceTestCases:AccessibilityInputConnectionTest
Test: atest CtsAccessibilityServiceTestCases:AccessibilityImeTest
Change-Id: I5ff2e804cbcf90828370a0612ff54111130bdff4
|
| |
|
|
|
|
| |
Bug: 217742181
Test: N/A, just comment change
Change-Id: Icf995b30ff12fc65d6b7455bb18e92882ad9f58f
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make the prefetching strategies public so a service can choose
which strategy works best in a particular spot. This should reduce
unnecessary/redundant prefetching.
For example, the FW currently only allows hybrid descendant
prefetching, but a service may want to do depth-first or
breadth-first traversal of the view hierarchy.
Currently, if there is another user interactive request, we
immediately return prefetched nodes. Also allow services to prevent
this interruption and force prefetching to a max of 50 nodes.
Services could potentially request a certain number of nodes, but
since asynchronous prefetching immediately returns the requested
node, the service can force prefetching of 50 nodes if desired,
and only exposing strategies touches less code, I prefer limiting this.
Also use a LinkedHashMap so ordering is kept when prefetching
descendants.
Test: Manual, talkback builds
atest AccessibilityCacheTest,
AccessibilityInteractionControllerNodeRequestsTest
Bug: 192489177
Change-Id: I3d8358411ece5d2e1380282824cd3cf1835658ac
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
InputMethodService is the primary and a11y is the secondary.
InputMethodService is not
affected by a11y status. When the session from input method is
established, app can start input (pass input context to input method).
When an a11y session comes back, it will be passed to the app. When
InputMethodManagerService binds to/start input with
InputMethodService, it does the same to a11y services which
requested IME functionalities.
It is possible that input method can edit text before ally sessios are
established. So the EditorInfo passed to a11y could be stale.
So when an a11y session is passed to client, client will send
a notification (input method doesn't have this extra notification) for
the current selection. I think since the time for a11y session establish
shouldn't be long, and we get the current state later, it should be fine
for a11y services.
When input method is disconnected from app (client) (even for input
method switching), we cleared a11y and sessions too. When
input method request sessions, we must rerequest sessions for a11y. This
is mainly because when we unbindCurrentClientLocked(SWITCH_IME), we set
active to false for the current client. Suppose we don't want to
change the current structure of input method, an inactive client
probably should clear accessibility sessions too.
When we switch to a client which already has a session with input
method, there might be some a11y sessions with this client, and
some a11y services might be disabled or enabled while the client was
switched out. We pass unchanged a11y
sessions to client, and request sessions for newly enabled a11y services.
When an a11y service is disabled, it removes its session
from all clients in InputMethodManagerService.
Test: type word through modified "switchToInputMethod". Tested session
notification through logs. Tested client switching, input method
switching, a11y service enabled/disable, multiple a11y services,
a11y service enabled before device reboot.
Also tested work profile.
Bug: 187453053
Change-Id: Ia651a811093a939d00c081be1961e24ed3ad0356
|
| |
|
|
|
|
| |
Bug: 195757359
Test: atest AccessibilityWindowReportingTest
Change-Id: I5fc1c90e87de17fb770f6a3371fc341985017a61
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See Design doc: go/b200769372
To make the behavior consistent on the new platform,
The legcay callback,
onMagnificationChanged(MagnificationController controller,
Region region, float scale, float centerX, float centerY)
keep notifying only full-screen magnification change as
before.
To support listening to the magnification changes of all
magnification modes, the service should overide
The new callback proposed in T,
onMagnificationChanged(MagnificationController controller,
Region region, MagnificationConfig config).
TODO: Notify magnifcation change when window magnifier turns off
Bug: 203013925
Test: atest AccessibilityMagnificationTest,
atest MagnificationControllerTest,
atest WindowMagnificationManagerTest,
atest WindowMagnificationControllerTest,
atest FullScreenMagnificationControllerTest,
Change-Id: Ia73195a71f55bb26ef3f2eafce0dc73d8a65583b
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Maintain a static collection of caches (sCaches). Lock is
sConnectionCache
- Initialize a cache when a connection is added. (client.addConnection)
- Remove the cache when a connection is removed. (client.removeConnection)
- System server should not have its cache initialized, can remove
parameter in AccessibiltyInteractionClient constructor
I tried to maintain a local reference (mAccessibilityCache) to the
service cache for each client to avoid accessing the static
collection for each request. But since the process is not immediately
killed when the service is turned off, ensuring resources are cleared
correctly is big time investment that can be done later if desired.
Bug: 192489177
Test: Build and use talkback, do the slew of tests.
atest CtsAccessibilityServiceTestCases CtsAccessibilityTestCases
CtsUiAutomationTestCases
FrameworksServicesTests:com.android.server.accessibility
FrameworksCoreTests:com.android.internal.accessibility
FrameworksCoreTests:android.view.accessibiliity
Change-Id: Ic30f6915c7b3c186a512ed8b410bf6e842eff5fb
|
| |
|
|
|
|
| |
Bug: 159651900
Test: atest TouchExplorationControllerTest
Change-Id: Ie28dccb0ed29e632bcdb057e909093fa5b7065ac
|
| |
|
|
|
|
|
|
|
| |
AnimationFrames aren't used anymore, so deprecate the APIs before
removal
Bug: 183993924
Test: N/A
Change-Id: I35076bb5a3d8445aaa0eab05221cdc228834a6d6
|
| |
|
|
|
|
|
|
|
|
| |
Added a way to capture just a window instead of the entire screen
to make tests easier.
Test: Builds
Bug: 185390632
Change-Id: I5138777bc87cdabcd2d8f574b1758509fc887c56
|
| |
|
|
|
|
|
|
|
| |
Added a new testAPI in UiAutomation to get the currently adopted
shell permissions using adoptShellPermissionIdentity.
Test: atest UiAutomationTest
Bug: 183716601
Change-Id: I66a6c753480cecf971f7354daaddbb404f5c1453
|
| |
|
|
|
|
| |
Fixes: 174484432
Test: javadoc only
Change-Id: I16cdffef36aa7d2acfd31e512ba8c262f6e04b8e
|
| |
|
|
|
|
|
|
|
|
|
|
| |
I need to perform a touch while animating in CTS to test ag/13067140,
but current methods all wait for animations to complete, which defeats
the purpose.
Creating new methods that optionally wait for animations to complete.
Test: atest WindowUntrustedTouchTest on child CL
Bug: 172787052
Change-Id: I4832ea2c62531a73098d2817930638ccb5f40765
|
| |
|
|
|
|
|
|
|
|
| |
Incremental and pm installs use stdin to provide APK data. This change
allows Jetpack to test incremental installs.
Bug: 162316399
Test: API change, already used in CTS
Test: atest PackageManagerShellCommandTest
Change-Id: I0a891535a7ff0b2a3459b03be56c6798e30086b6
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tests sometimes fail due to a shell command failing, bet we don't get the
appropriate result from the command run itself, which leads to confusing
states and challenging troubleshooting.
E.g. jobscheduler reports its failure only via stderr.
This introduces a utility that fails with the relevant command output,
should something be printed to stderr.
Test: atest AutoRevokeTest
Bug: 168843991
Change-Id: I5e354c1b88ca3ceeeda2d5500b62c421174fd57c
|
| |
|
|
|
|
|
|
|
| |
UiAutomation should have an option not to engage accessibility.
go/uiautomation_not_use_a11y
Bug: 93087044
Test: atest UiAutomationManagerTest, atest CtsUiAutomationTestCases
Change-Id: Icc6c359844817a07869a18345fe44ef3b2813dae
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's a lot of confusing logic where 90 and 270 rotation values need
to be flipped to ensure the screenshot is taken the correct orientation.
There's also confusion what useIdentityTransform means, especially if a
non 0 rotation value is sent.
The cases screenshot cares about is the following:
1. Take screenshot in current display orientation
2. Take screenshot with 0 rotation so the caller can handle rotating the
screenshot themselves.
With these two cases in mind, remove the rotation value passed in for
screenshots. If useIdentityTransform is true, it will rotate the
screenshot so it's in the 0 orientation. If useIdentityTransform is
false, it will use the current display rotation.
This simplifies the caller logic since they no longer have to find the
current display rotation to ensure the screenshot is taken in the
current rotation. The callers can just request the screenshot with
useIdentityTransform set to false.
Test: adb shell screencap
Test: Power + volume screenshot
Test: Screen rotation
Fixes: 135942984
Change-Id: I3435ee8b5dac05e910ec1e695f398c5dcdcff9e9
|
| |
|
|
|
|
|
|
|
|
|
| |
Now #disconnect won't throw if the previous #connect failed due to
timeout. Note we also introduce generation id so we won't receive
notifications or modifications from the previous client to disrupt
UiAutomation's status when making the next connection.
Bug: 147785023
Test: m
Change-Id: Idf77207124494bd78770b8ea5d9ac4b1fd1a490a
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add #connectWithTimeout which allows us to specify the timeout before
giving up the connection. The method throws a TimeoutException so the
caller can catch it and retry connection again.
Note we don't change the exception spec. of #connect in order to be
source and binary compatible.
Bug: 147785023
Test: m
Change-Id: I5ac61ed0aef107f4e38166c0b95bc3a3fb419387
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Roll back the method, takeScreenshot(), of the UiAutomationConnection
class using by the UiAutomation class due to the return type of the
method, takeScreenshot(), of the AccessibilityService class, isn't
the Bitmap. Besides they also used the different methods of the
SurfaceControl class now.
Bug: 10931661
Test: a11y CTS tests
Change-Id: I7459ebfe77162e51ed3a50c8663e13579a8a67a3
|
| |
|
|
|
|
|
|
| |
Test: atest AbstractAccessibilityServiceConnectionTest
atest AccessibilityServiceTest
atest AccessibilityManagerServiceTest
Bug: 136286274
Change-Id: I6810cc9d2fff3f81f76b63fb075a68973e9757c8
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implementing the new API for A11y services to take the screenshot
of the specified display.
Bitmap takeScreenshot(int displayId)
1. The main codes is moved from the UiAutomationConnection class and
let the UiAutomation change to use this API.
2. Add a capability at metadata to check whether the A11y services could use this
API or not.
3. This API is a async one for A11y services, but is a sync one for
UiAutomation.
Bug: 10931661
Test: a11y CTS & unit tests
Change-Id: I478bd93c60d4742bef20ae0e423ca9de1bda55d2
|
| |
|
|
|
|
|
|
| |
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I8789f8499d4dca08580672e9e45ed9a7026dd686
|
| |
|
|
|
|
|
|
|
|
|
|
| |
1. Implementing the new API for supporting multi-display.
SparseArray<List<AccessibilityWindowInfo>> getWindowsOnAllDisplays()
2. Modifying the documents of this API and its function is to get the window lists of
default display.
List<AccessibilityWindowInfo> getWindows()
Bug: 133279356
Test: a11y CTS & unit tests
Change-Id: Id4e874f43390bdf4196d106a44bbca18bf9fd1d6
|
| |
|
|
|
|
|
|
|
| |
Rename AccessibilityGestureInfo to AccessibilityGestureEvent
Bug: 139127300
Test: atest AccessibilityGestureDetectorTest
Test: atest AccessibilityGestureEventTest
Change-Id: I1f08d89fbb6df30d48d424ff62cfa6b35d5e9430
|
| |
|
|
|
|
| |
Test: atest UiAutomationTest
Bug: 134536201
Change-Id: Ibab34b1908143d894076abf5d9f3692bc03c70db
|
| |
|
|
|
|
|
|
|
| |
New api for a11y service to specify display id and return
accessibilitybutton controller per display.
Bug: 120762691
Test: a11y CTS & unit tests
Change-Id: I859c3b1257da3c3ad32dc23601134f42e11a4d07
|
| |
|
|
|
|
|
|
|
| |
We added a new API to help App developers know the gesture information
performed on specific display.
Bug: 133290787
Test: atest AccessibilityGestureDetectorTest
Change-Id: Ic98847691ba9f608f418408e9bef1c3116388f3c
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, there was only a way to inject input after syncing inputs.
However, some tests require a direct call to sync inputs since we need
to ensure the info was propagated to InputManager native before
continuing with the test. This exposes a method just to
syncInputTransactions.
Bug: 130695122
Test: ActivityLifecycleTopResumedStateTests
Test: MultiDisplayPolicyTests
Change-Id: Ie3115741a20d04c743fd854ac421dc3705332488
|
| |
|
|
|
|
|
|
| |
Test: manual
bug:126699370
Change-Id: Ie3bcb82ed24a1aa98004d88befe1f14c0c9e658b
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
Add an API to allow adopting a subset of shell UID permissions.
Test: added - android.app.uiautomation.cts.UiAutomationTest#testAdoptSomeShellPermissions
passed - atest atest android.app.uiautomation.cts.UiAutomationTest
bug:80415658
Change-Id: I5cd8beeed7e586b2ac4e0cb16686cef738641e23
|
| |
|
|
|
|
|
|
|
|
|
| |
As its JavaDoc says, in most of cases PooledLambda.obtainMessage() is
a better choice than PooledLambda.obtainRunnable().
If PooledLambda.obtainRunnable() is really necessary, let's make sure
to call recycleOnUse() whenever possible.
Test: presubmit
Change-Id: I3dbe500f49c0df187f2ffefd11c71836696dfd4e
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For packages:
android.app.usage
android.app.trust
android.app.timezonedetector
android.app.timezone
android.app.timedetector
android.app.job
android.app.backup
android.app.assist
android.app.admin
android.app
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: I618c5dc4462ae990d9df45c3e9ed3f092cc5138c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For testing we often need to run shell commands. This can be done
today via running a shell command from an instrumentation test
started from the shell. However, this requires adding shell commands
which are not in the API contract, involve boilerplate code, require
string parsing, etc.
This change allows an instrumentation started from the shell to
adopt the shell UID permission state. As a result one can call APIs
protected by permissions normal apps cannot get by are granted to
the shell. This enables adding dedicated test APIs protected by
signatures permissions granted to the shell.
Test: cts-tradefed run cts-dev -m CtsUiAutomationTestCases
-t android.app.uiautomation.cts.UiAutomationTest#testAdoptShellPermissions
bug:80415658
Change-Id: I4bfd4b475225125512abf80ea98cd8fcacb6a1be
|
| |
|
|
|
|
|
|
|
|
| |
Test: cts-tradefed run cts -m CtsUiAutomationTestCases
cts-tradefed run cts -m CtsAccessibilityServiceTestCases
cts-tradefed run cts-instant -m CtsAccessibilityServiceTestCases
bug:80024164
Change-Id: I72c565d28f4cbcf6775535fb846b268b785a6b34
|
| |
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
| |
Expose these as public API, since they're useful for devices where
the raw "pm grant" or "pm revoke" commands can be flaky.
Test: builds, boots
Bug: 75315597
Change-Id: I2de94587945f08fd09ebe729bb9872542a11ef26
|
| |
|
|
|
|
|
|
| |
This reverts commit e4d31b3c103045d5b2b141a05084dced595cc64f.
Fixes: 71904218
Test: presubmit
Change-Id: Id73bde1a0c11696cf561c84cde027cdca4c6a00f
|
| |
|
|
|
|
|
|
|
|
|
|
| |
..and also extract common code into a common superclass
This also preserves the order of the throttled events
(TYPE_VIEW_SCROLLED & TYPE_WINDOW_CONTENT_CHANGED) with regards to the rest
of events by flushing any pending throttled events immediately if another
event is requested to be sent.
Test: ensure no new a11y CTS failures
Change-Id: I948a16716521974393aaa1cf822d0a0324e9ce3a
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The previous screenshot requests in SystemUI would generate a bitmap
and then adjust crop and rotation afterwards. Bitmaps from screenshots
are now hw Bitmaps so they can't be updated in software. Instead request
the proper crop and rotation from the native code to generate a Bitmap
with the correct configurations.
Change-Id: I4591c468b055c784460e5ddf2f9163ffa943c2ee
Fixes: 69898957
Test: Manual screenshots work and bugreport screenshots work in landscape.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hid command, JNI layer:
- Removed dependency of the hid device on libandroid_runtime
and libutils. Using ALooper from libandroid to process callbacks from
/dev/uhid file descriptor.
- Switched to using "CREATE2" and "INPUT2" constructs in uhid driver
Hid command, Java layer:
- Removed delay workarounds, user now responsible for waiting for
onInputDeviceChanged notification prior to using the hid commands.
UiAutomation:
- Added a new executeShellCommandRw function that allows bidirectional
communication to shell command
platform.xml:
- Added uhid permissions to bluetooth stack for /dev/uhid access
- CTS test now consistently passes
Bug: 34052337
Test: CTS test case invoked with the following command:
run cts -t android.hardware.input.cts.tests.GamepadTestCase
-m CtsHardwareTestCases --skip-system-status-check
com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker
Change-Id: Ic916c513b7e652b1e25675f0f38f0f1f3a65d214
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
Bug: 27148522
Test: Unit tests for two new classes in this CL, CTS in
linked CL.
Change-Id: Icb5113e00b1f8724814263b3cc7f72fe4a6f0b41
|
| |
|
|
|
|
|
|
|
|
|
| |
- Remove references to ActivityManagerProxy.
- Add isSystemReady to ActivityManager.
Bug: 30977067
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts
adb shell am instrument -e class com.android.server.am.ActivityManagerTest,com.android.server.am.TaskStackChangedListenerTest \
-w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I07390b6124fb1515821f5c0b37baf6ae74adc8fa
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were marking subtree events as not important for
accessibility based on the root view, but that doesn't
take into account the fact that important children may have
changed. In particular, adding a View to the hierarchy was
sometimes marked as not important because the layout it was
attached to was not important.
Also fixing an issue with UiAutomation where it called out
to the test filter with a lock held.
Also fixing an issue where nodes that are the source of
accessibility events are always marked as important for
accessibility.
Bug: 31226561
Change-Id: Ib619948ba1bbcfd00aef1d10726152f6cf2dfccd
|
| |
|
|
|
| |
Bug: 28771617
Change-Id: Ib113883d3d12fc6a9e8c038e2c4eb1731b026b38
|