The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.
Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: Ia6f216cc36ad0a5758f39fd9b34962cd4adf9d8e
Uses the atom MagnificationFollowTypingFocusActivatedSessionReported in
westworld to log the activated session duration for the window magnifier
which its following typing focus is enabled.
The duration is accumulated by the time when the window magnifier and
the ime are all on. If one of them is off, we would pause the
accumulated timer. If a user moves the window magnifier to disables
this function, we would stop the accumulated timer and log the duration.
Bug: 216733714
Test: m statsd_testdrive & statsd_testdrive 453
atest WindowMagnificationManagerTest
Change-Id: I994fc2a3ada8a90fde8b3a0b4f1cc8d7ec21638a
Merged-In: I994fc2a3ada8a90fde8b3a0b4f1cc8d7ec21638a
Uses the atom MagnificationTripleTapAndHoldActivatedSessionReported in
westworld to log the activated session duration for the window magnifier
which is triggered by the triple-tap-and-hold gesture.
The duration is from the window magnifier's enabled time to its disabled
time.
Bug: 216733714
Test: atest WindowMagnificationGestureHandlerTest
m statsd_testdrive & statsd_testdrive 452
Change-Id: I423ac39c167c89b0b2db931a616cdd34d6eb151c
Merged-In: I423ac39c167c89b0b2db931a616cdd34d6eb151c
Make constructor visible for tests
Make all fields final (no setters, so already effectively final)
Remove mHasStatusBar and mHasNavBar (unused)
Remove overload 'takeScreenshot' method without a source param
Added missing @IntDef annotations to parameters
Bug: 231957192
Test: atest ScreenshotHelperTest SystemActionPerformerTest
Change-Id: Ief43bd0ba50dafac720ae18d00c3c99b8d31e2e1
This fixes an issue where the device was crashing and rebooting when
triple tapping to activate magnification at the same time as covering
the proxmity sensor while on a voice call.
Bug: b/236875528
Test: manual:
1. Perform a voice call
2. While on voice call, execute the "Triple tap on screen" gesture,
holding down your finger on the last tap and then cover the proximity
sensor.
3. The device should not crash
Change-Id: I9415c5b378b32342c016b17dfcef12cde45ce237
Since the WindowInfo is null if the FLAG_RETRIEVE_INTERACTIVE_WINDOWS is
unset, we would fail to calculate the node bound correctly.
The reason behind this failure is that the accessibility framework only
tracks windows when the FLAG_RETRIEVE_INTERACTIVE_WINDOWS is set.
As being a short term solution, we could retrieve the transformation matrix
and magnification spec from WindowState, making us have this CL.
However, as a long term solution, we should keep tracking WindowInfo in
DisplayWindowsObserver whether the flag is set or unset and mitigate the
additional system overhead.
Bug: 229379635
Test: atest android.accessibilityservice.cts
atest com.android.server.accessibility
We use a test apk to test the node bound value when the flag is
unset equals to the value from WindowInfo when the flag is set.
Change-Id: I02e7e74d027dc65605f5e8fcc10d3c808e316476
windows
If accessibility framework doesn't track windows, the active window
is updated when receving window_state_changed event. ViewRootImpl
sends this event when performing traversal first time, however the
focused window token is not updated yet from InputManagerService.
To fix the regression issue, we fallback to the legacy approach for
short term solution.
Test: atest android.accessibilityservice.cts
Bug: 228442331
Change-Id: I032a73b9f4cf408a5dd6cae8a87bd26131ebdbfa
ViewRootImpl sends window_state_changed event to notify
AccessibilityService that itself is visible on the screen. However,
the corresponding window is not available from accessibility framework
perspective because the window information is from SurfaceFlinger process
now, so the window is added only when it is really visible on the screen.
To ensure accessibilityService could get the node or the window when
receiving this event, we postpone this event until the corresponding
window is added. We also set a timeout to send those pending events.
Bug: 228442331
Bug: 226371995
Test: atest CtsAccessibilityServiceTestCases
manual test: write a sample AccessibilityService to test the apis
when receving window_state_changed events
Change-Id: I92cf2ddb9de90c050cf145f746a53f31d3a5df83
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
fb17e5ae7a
[2]: I2af3cd50444d8ddf25aa0f6479238156914e6fff
dc635efb68
Fix: 215633021
Fix: 215636776
Test: atest CtsInputMethodTestCases:AccessibilityInputMethodTest
Test: atest CtsAccessibilityServiceTestCases:AccessibilityInputConnectionTest
Test: atest CtsAccessibilityServiceTestCases:AccessibilityImeTest
Change-Id: I5ff2e804cbcf90828370a0612ff54111130bdff4
The attachInfo from ViewRootImpl is not reliable
for DisplayArea manipulation or windowless window.
To fix this problem, we use the transform matrix of
InputWindowHandle, which could transform the bounds
from window coorindate to screen coordinate. We also
transfrom the bounds to logical display coordinates
with the associated display matrix.
Besides, we also record the magnification spec of the window,
which could get the bounds before magnification. We use
this value to decide the property 'visibleToUser'.
Bug: 200797785
Test: atest android.accessibilityservice.cts WindowInfoTest
atest com.android.server.accessibility
Change-Id: I0917b04fe8b027fb2bd932a6f0604ba1449ebc66
When the magnification settings mode or config mode transitions,
MagnificationController would
1. Disables the current magnification mode. Then
2. Starts to enable the target magnification mode.
To prevent the magnification change callback send twice during the
mode transition, MagnificationController should only notify the
change of the transitioning target mode and ignore the notifcation
change for the disabling magnification mode.
And when WindowMagnification resets or disables by
WindowMagnificationController#deleteWindowMagnification(),
it should notify source bounds empty when magnification is deleted.
And when FullscreenMagnification resets and the animator is animating,
FullScreenMagnificationController should notify magnification
change.
Bug: 209701404
Bug: 210636326
Test: atest AccessibilityMagnificationTest,
atest WindowMagnificationControllerTest,
atest com.android.server.accessibility.magnification
Change-Id: Ief718614d80177a4a076eddc708a7ecfc4dfb73f
We need to be able to initiate touch exploration even if there are no pointers on the screen in order to reliably cover the case where a user just taps the screen.
The user expects to hear if they have tapped on anything.
Bug: 223673301
Test: manual. Tap on the screen and confirm that talkback reads the item in that position.
Change-Id: Id96fa8bd7f000ea153f45024e06915a43ca80826
non-A11yTool notification is going to be integranted
in PermissionController. We will stop secheduling intent
and sending notification if the safety center is enabled, and
reschedule the intents for none-Accessibility servicewhen the
flag is flipped to true.
Bug: 221369374
Test: atest AccessibilitySecurityPolicyTest
atest PolicyWarningUIControllerTest
manual test
Change-Id: I5ab46da053e5ded5422ac932ca3de969c89b8c21
In previous, we only use a variable to record the state of magnification
mode. Therefore, it would be confused when there are multiple displays.
Now, we use sparse array to keep the state of current magnification mode
and last magnification activated modes with corresponding displayId,
making us have ability to distinguish different modes in different
displayId.
Bug: 182227245
Test: atest MagnificationControllerTest
atest MagnificationProcessorTest
atest FullScreenMagnificationGestureHandlerTest
atest MagnificationConfigTest
Change-Id: I239faab22bb6abe3e6cadde9b09eba496c4688c0
When some applications create an external service and register this service
to be an A11y service, then this service can kill the system and restart
it continuously.
This is a security vulnerability and we add not allow an external service
to register as an A11y service to fix it.
Bug: 216115176
Test: a11y CTS & unit tests
Change-Id: If75b9c300df73e98be92d6c14d69301cc377b205
Sending without copying causes some motion events to get duplicated in the service's motion event stream.
Fix: 223674686
Bug: 223673301
Test: Manual. Perform three-finger swipes and insure they work as expected.
Change-Id: Ie94ef06605902f2b3be5fb426511d5c80cf1ac09
Only lock when obtaining the input filter to avoid deadlock when bringing up talkback settings.
Fix:223673816
Test: Manual. Bring up talkback settings and insure that there is no ten second wait.
Change-Id: Ic26a3a08a7c67b096a7995332e3ed5096fde4847
When the platform does not support window magnification feature,
AccessibilityManagerService should fallback magnification mode
settings if the magnification mode of userState is window mode
that is invalid.
Bug: 213414385
Test: manual test
Change-Id: I810131f7b1925b6b010c21d822b521d29ee3a646
In the previous version, GesturesObserver#clear would be called by
MagnificationGesturesObserver, making the matchers' state be clear by
outside class. It would make the matchers' state not consistency in
GesturesObserver#onMotionEvent. Especially, when the matcher is
completed and becomes STATE_GESTURE_COMPLETED, it would be clear as
STATE_CLEAR by MagnificationGesturesObserver#clear which would trigger
GesturesObserver#clear. It would make the GesturesObserver keep going to
check other matchers since matcher.getState() !=
GestureMatcher.STATE_GESTURE_COMPLETED and wouldn't early return.
Therefore, we make GesturesObserver#clear as a private method and make
it to manager its matchers' state.
Bug: 206061247
Test: atest GesturesObserverTest
atest MagnificationGesturesObserverTest
atest MagnificationGestureHandlerTest
atest WindowMagnificationGestureHandlerTest
Change-Id: I19294e231f969d7dd54b50dc9a2deb36d06b532a
We print the readable string instead of integer value
to improve debugging efficiency.
Bug: 214785717
Test: build pass
Change-Id: I0f8ac7cd545674455019433d76db374cd6696387
When IMF calls into A11yManagerService, A11yMannagerService
will post the call to main handler so the function call
returns without holding the a11y mLock.
Fix: 218182733
Test: atest AccessibilityImeTest
Change-Id: I3f7fcb1906b4084b2458ce2b65bb6fec8e9c6ae1
In previous, requestRectangleOnScreen would only apply the shortest
movement on the magnifier to the rectangle. However, it will make typing
words out of the screen. Therefore, we add an additional distance for
moving the magnifier to help a user know the surrounding context.
Bug: 148882866
Test: atest FullScreenMagnificationControllerTest
Change-Id: Iee7a4f13395ed8acf3ffa7df759542fcb08190f8
When the flag is set dynmatically, we need to create the InputMethod()
instance and request to bind ime. If the flag is unset, we clear the
InputMethod() instance and unbind ime.
Fix: 218193835
Test: Tested with talkback. When the flag is not set, we can't use
ime. When the flag is set, we can use ime again (dynamically set
flags).
Change-Id: Ied48d452108a593e8e4ee5c67c3208acbc87335e
Change-Id: I2a85c64b089983807cb7627de9b8512e8f716426
(cherry picked from commit 14e78228a1)
We were queueing up ACTION_HOVER_EXIT when initiating touch exploration which doesn't make sense. ACTION_HOVER_EXIT only makes sense on ACTION_UP when touch exploring.
Fix: 219814318
Fix: 220387502
Test: Verify that entering a pin works as expected.
Test: Verify that touch exploration does not get stuck often, only occasionally per b/215654623
Change-Id: Iab29f7736ab4ff3ea24c26109073481a876ffb58
This reverts commit f1f2c84756.
The stragery is chaged, we don't need to check the installer
nor if it is sytem app. We also delete the tests that are
obsolete.
Bug: 221318082
Test: AccessibilitySecurityPolicyTest, PolicyWarningUIControllerTest
Change-Id: Ide89213dbf90cdb57001e5b05a2eeefc35f6adee