For MagnificationGestureHandler, enable the support for multi-display
by giving actual display id instead of default one.
Bug: 112273690
Test: A11y CTS & unit test
Test: manual
Change-Id: I0f1e844e491f39d35b75ab398ff9481680610fc9
In order to support multi-display, some event handlers need to be
plural. Based on the characteristic of each event handler, only
the event handler that needs to deal with concurrent events from
different display needs multi-instance.
Test: a11y CTS & unit tests
Test: atest SystemUITests
Change-Id: I76379fb82aad09ee20609d81bd5b1dda15931905
Triple tap gesture didn't consider the case when user tap quickly
and out of distance slop. Just send out all delay motion events
if we detect a tap with out of the distance slop.
Bug: 122623669
Test: atest MagnificationGestureHandlerTest
Change-Id: Iadd05441e10f720f57297b6091f4acff5d198b7c
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 get accessibility window id from window token. This API
can be called only from a system process.
Bug: 119794051
Test: None
Change-Id: I37db50209efeb81f3e3502d84fd53fedec695f99
Surface scaling is now automatically/in-general applied to input
coordinates and so the accessibility service doesn't need to do
it's own scaling. We also track the renaming of "scaleFactor"
to "globalScaleFactor"
Bug: 80101428
Bug: 113136004
Bug: 111440400
Test: Magnifier works
Change-Id: Ib6a0ad7df56c7d040497d6f352abe3d74c38a49f
A11y clients do not get correct RelevantEventTypes value
immediately, after a11y state turn on. This impact a11y clients
sending a11y events.
Bug: 112870790
Test: Manual - adb shell uiautomator dump
Test: atest CtsAccessibilityServiceTestCases
Change-Id: I6c55e4cd8e8823c2741628c38f94ab627ba74295
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
When gesture detection fails, TouchExplorer will try to transit to
exploration state once user is still touching the screen. However,
it resets the state right after it tries to transit to exploration
state currently.
Bug: 118724767
Test: A11y CTS & unit test
Change-Id: Ifcf931233da7cfcaf5b6c608bcd1c26e3a7a904a
Two orthogonal changes:
1. Making bindInstantService property internal to UserState and
putting a permission check on the setter.
Having the setter in SecurityPolicy didn't make sense to me
since the field was public anyway.
I'm removing the permission check on the getter for the system,
since the field is checked anyway in getInstalledA11yServices.
So it seems like it's possible to determine the value of this
value without the permission. It also just doesn't seem like
reading this value has any security implications.
I'm doing this as part of pulling SecurityPolicy out of AMS. It
felt silly to have a permission check that was only enforced
if the caller went out of its way to have it enforced.
2. Making list of valid packages independent of the caller.
Bug: 110715236
Fixes: 118701258
Test: A11y CTS
Change-Id: I43ad0b3f3e30eae1c2a3582db672217d957919df
Also create a new MANAGE_ACCESSIBILITY permission to
perform the shortcut.
Bug: 116118615
Test: make, activate accessibility shortcut
Change-Id: Ic65a0cdf7393429e14cb98f4fb0734d20069b05a
Refactor
1. Create DisplayMagnification to support multi-display
2. Using PooledLambda to simplify the existing code
Bug: 112273690
Test: MagnificationControllerTest, MagnificationGestureHandlerTest and
Manual test.
Change-Id: I19436b4671421dc58c0036e55f75178c1f413e9e
The WindowInfo may be null if the target window can't be found in
current mWindowInfoById. Add null guard to prevent from NPE here.
Bug: 116652152
Test: atest CtsAccessibilityServiceTestCases
Test: atest CtsAccessibilityTestCases
Change-Id: Iaf2446e66420289be4154e90fbe213bbca9fd41f
The client change method needs to be called with a lock
held, and there's a one-off bug that looks like two threads
were shutting down UiAutomation simultaneously. Adding
a lock to prevent this from happening.
Bug: 111170405
Bug: 110845380
Test: A11y CTS and unit tests. I can't repro the issue, so
I can't write a test that specifically causes the problem
that this test makes pass.
Change-Id: Ia01603fcca5bcee70efd24e7af667d47d3057d61
When an accessibility service package changes, it would be unbound.
This also causes it's removed from mBoundServices and adding into
mBindingServices currently. Hence, nothing happens since it's not
in mBoundServices in onPackageUpdateFinished(). Also, this service
wouldn't be bound since it is kept in mBindingServices. Remove the
accessibility service from mBindingServices after update, remove,
and force stop.
Bug: 116758044
Test: atest CtsAccessibilityServiceTestCases
Test: atest CtsAccessibilityTestCases
Test: update, remove, and force stop an enabled a11y service, and
check if it could work again.
Change-Id: I61f8ac3ad92480b296f9970c9bb92af8f6767f1a
- Remove @BeforeClass `Looper.prepare()` that do not work with atest
- Fix TouchExplorerTest: mock AccessibilityGestureDetector to not create
internal handler.
- Fix broken tests in MagnificationControllerTest
- Remove @FlakyTest annotation from MagnificationControllerTest &
FingerprintGestureControllerTest
When using atest, timeout is applied to command `am instrument`. Then
@BeforeClass & @Before are both running on instrument thread, but test
cases are running on a seperate thread. It dispatch messages immediately
if the looper is associated to the same thread. When runniung tests with
atest, dispatching the message is not always done in the same thread. So
verifying the expectation on test thread would be flaky.
The solution to use a looper associated with test thread would be ugly.
Because the looper related stuff should set up without @Before or
@BeforeClass including preparing a looper on demand in a utility
function for every test case needed.
Here changing the handler behavior to enqueue but to dispatch messages
explictly from test could serialize the execution. This would use main
looper (no need to prepare) to create handler, but dispatch and clear
messages ourself. Not good enough but less ugly to run `am instrument`
with or without timeout.
Bug: 74748946
Test: atest -d FrameworksServicesTests:com.android.server.accessibility
Test: adb shell am instrument -w -e package com.android.server.accessibility \
com.android.frameworks.servicestests/androidx.test.runner.AndroidJUnitRunner
Change-Id: Ib67d8b7305511d218b23f4b5ab0b0a12bea9ae10
Some accessibility actions (e.g., click) aren't counted as touch
currently. Hence, windows that are monitoring touches outside of
themselves wouldn't be notified when an accessibility action
takes place on another window.
WindowsInfo doesn't record if a window monitoring touches outside
nowadays. In order to find out this kind of window, add the field
for it.
Bug: 76228634
Bug: 62725890
Test: check if dialogs (e.g., volume panel or a11y menu) dismiss
after performing a11y action click.
Test: atest CtsAccessibilityServiceTestCases
Test: atest CtsAccessibilityTestCases
Test: atest WindowStateTests
Change-Id: I4fd84848b8a445e6df22251d68449ae8b502c601
- Add test cases to check sent action-change-to-non-move motion events
is not contain history.
- Fix AccessilityGestureDetector TODO that will affect atest test fail
Bug: 74069091
Test: atest FrameworksServicesTests:TouchExplorerTest FrameworksServicesTests:AccessibilityGestureDetectorTest
Change-Id: Iae4321eaeea15021dfed4503da4665398d899c07
It leaves empty string instead of null for the value of
secure.enabled_accessibility_services. It may cause other tests
fails.
Bug: 111317486
Test: atest CtsAccessibilityServiceTestCases
Test: manual check the value of settings providers after test
Change-Id: I3f882ba00145ffa555514117c4684aec9ce33947
TouchExplorer doesn't check for double tap (and hold) so there may
be duplicated TYPE_TOUCH_INTERACTION_START/END events.
Bug: 66730372
Test: manual
Test: CtsAccessibilityServiceTestCases
Test: CtsAccessibilityTestCases
Change-Id: Iece13d3a401f13d8a7dcda2147b2865eee5e5f33
Move events may contain a history of other move events. When we split
the event, each of the resulting events has history. When the system
dispatches the events, it also dispatches the ones in the history.
We change these events with actions which are NOT ACTION_MOVE and
inject to input. But those histories are no longer consistent with what
happened and are causing InputDispatcher::injectInputEvent to enqueue
duplicated events of each historical pointer coord.
Bug: 74069091
Test: manual
Test: atest CtsAccessibilityTestCases
Test: atest CtsAccessibilityServiceTestCases
Change-Id: I2a9f5526cbeecfcc379f86624607190e16265405
If the disabled service is the last service to magnify, reset the
magnification.
Bug: 28623059
Test: manual
Test: atest CtsAccessibilityTestCases
Test: atest CtsAccessibilityServiceTestCases
Test: testResetIfNeeded_resetsOnlyIfLastMagnifyingServiceIsDisabled
Change-Id: I6b12a5251b5fede8d2c9eb06048bf9fa4bd70f8b
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
It only returns true if magnification changes from magnifying to
non-magnifying. This is inconsistent with the docs. Return true if
the magnification scale and center is reset.
Bug: 64616261
Test: atest CtsAccessibilityTestCases
Test: atest CtsAccessibilityServiceTestCases
Change-Id: I0c496c5c45c2e35025f1887842a2a9741c440af1
TouchExplorer uses raw event in both a11y and standard gestures
detection, but transformed event in following movement. This
inconsistency causes significant difference of distance between
their locations when screen is magnified and long press would fail.
Passing transformed events for standard gesture detector instead.
Bug: 67378068
Test: manually test if double tap and hold works while Talkback
and Magnification are both enabled.
Test: manually test if Talkback and Magnification work as expected.
Test: AccessibilityGestureDetectorTest
Change-Id: I0e1dc59e25bc36f1f99ba6ecdb05c9c488b6f47e
This is for the event that a key has been intercepted, sent to the app,
and the app hasn't handled it yet. If the connection dies, the key is
lost. So flush all pending keys.
Test: Unit test (this would have caught me introducing this bug in the
first place).
Bug:74593001
Change-Id: I5a94aafe5c58f18a3e9ca46f7cd5a9cb71d38aaa
One heavy dependence between the current AMS service and activities
is process management which is heavy affected by activities and their
current state. We introduce WindowProcessController and WindowProcessListener
objects as a structured way for the process changes in AM package to
be communicated to the WM package and WindowProcessListner for activity
changes in the WM package to the communicated back to the AM package.
The ProcessRecord object in AM will own the WindowProcessController object
and also implement the WindowProcessListener.
Test: Existing tests pass
Test: go/wm-smoke-auto
Bug: 80414790
Change-Id: I9e96e841b0f95e99a597cb4629fa5d2fe45760b6
3rd step in unifying the window hierarchy that is currently split
within AM and WM packages. We separate the the internal interface used
to communicate within system server dealing with activities and their
containers (tasks, stack, display) from the rest of AM internal
interface.
Test: Existing tests pass
Test: go/wm-smoke-auto
Bug: 80414790
Change-Id: Idad77721c1fe10621b9be5dced42a0a11f0183e5