The virtaul display with private flag can't be access by other process.
To prevent AceesibilityService redispatches/injects motionevents on it,
We don't add it to valid displayList.
Bug: 138637403
Test: AccessibilityInputFilterTest
Test: AccessibilityGestureDectorTest
Change-Id: I7b60e4eee87b0812d3c882d0e45bbf2016190e6a
Given the number of classes that are going to be created (gesture detectors, TouchExplorer state handlers) it made sense to put them into their own package.
Bug: 136131815
Test: atest CtsAccessibilityServiceTestCases CtsAccessibilityTestCases
Change-Id: Ie347424ecd7518a7c5a4fdefdca5b4886b1fd8e4
Although we have MotionEventInjector for each display but it always
inject events to default display. We set display id of the motion events
to make it correct.
Test: atest MotionEventInjectorTest
Test: atest AccessibilityGestureDetectorTest
Test: atest AccessibilityServiceConnectionTest
Bug: 138422679
Change-Id: I8cfbe9887109e001ea64ca0c250606684be370e7
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
We add this API to support dispatching gesures on mulit-display. If the
display id is invalid or the assigned display is untouchable, this
action would be cancelled.
Test: atest AccessibilityServiceConnectionTest
Bug: 133290787
Change-Id: Ic0e265f7b0b2a9601a670e290d6d2dab27a92545
1. Making WindowsForAccessibilityObserver class to be plural for
supporting multi-display.
2. Adding the display information when WindowManagerService informs the
window changes to Accessibility Controller.
Bug: 132854721
Test: a11y CTS & unit tests
Change-Id: I0efba7d924b24fcab85c6bb333687cc4cefa890f
To make an a11y overlay window available on a specific display, we need
to update window token and update the context with a specific display
information when AccessibilityServiceConnection or diplay is changed.
Bug: 133304985
Test: a11y CTS & unit tests
Change-Id: Ib8693978e2455b5f568e195167e319b5b6cc9f02
To support non-rectangular visible area for windows, add new APIs
about RegionInScreen in A11yWindowInfo to represent the actual
interact-able area of a window.
Bug: 132146558
Test: a11y CTS & unit tests
Change-Id: I86bb6bc8c567e09f01a3f853a3cffd896ce934c8
When detecting gesturs, the threshold is based on the display metrics.
To get correct display metrics, we replace default context with displayContext.
Bug: 136425762
Test: atest TouchExploreTest
Test: atest MagnificationGestureHandlerTest
Change-Id: I2d6c5a0ef00966d9164e117fc65dac8131f7a175
No need to check the min distsance, always adjust the event location.
Remove mScaledMinPointerDistanceToUseMiddleLocation and
MIN_POINTER_DISTANCE_TO_USE_MIDDLE_LOCATION_DIP.
Bug: 134124639
Test: atest TouchExplorerTest
Change-Id: I8be1d665e307d0191aecef3f6f16d825514ce628
MagnificationGestureHandler cache some events to see if users want to
trigger magnification. If no magnification is triggered we inject the
events with original down time. This causes the subsequent modules,
like GestureDetector, be misleading. For example, injecting a cached
ACTION_DOWN event may mistrigger a long click if the down time of the
event is long enough ago.
Bug: 131815497
Test: a11y CTS & unit tests
Change-Id: I19508e8ef7c91af02cdc628463d5715f6de22cd3
To support multi-display, we need to retrive display id from
AccessibilityWindowInfo.
Test: atest ctsAccessibilityWindoInfoTest
Bug: 132851274
Change-Id: Ia59bd83e223ecf5c9af7e4b0a52150e0353192c7
To scroll on the screen when using TalkBack, a user need to dragging two
finger pointers. If the dragging pointer are closer that a given distance
we use the location of the primary one. Otherwise, we should adjust the
event location to take the middle between the two finger pointers.
Bug: 126354276
Test: atest TouchExplorerTest
Change-Id: I9e95ccec964d7930498febdd02731b94826fbb7b
In order to dismiss dialog in accessibility, we would also send
ACTION_OUTSIDE while performing ACTION_CLICK. However, the result
of performing ACTION_CLICK in AccessibilityInteractionClient may
be overwritten by the result of performing ACTION_OUTSIDE. This
causes that TouchExplorer may get incorrect result and follow-up
behavior is different.
Bug: 127902192
Test: a11y CTS & unit tests
Test: After enabling Talkback, manually test on 'View Terms' page
in ManagedProvisioning to check if the section heading can
be expanded/collapsed by double tap.
Change-Id: Id6b1f63ea87418c66bf1aebdea829f656581e8ed
Currently, MotionEventInjector would cancel any injected gesture when
any MotionEvent arrives. For user using an external device to control
the pointer movement, it's almost impossible to perform the gestures.
Any slightly unintended movement results in the cancellation of the
gesture.
However, if MotionEventInjector keeps sending mouse movement events
when gesture is performing, dispatch logic would be confused and it
causes the gesture malfunction. Therefore, ignore movement events
from mouse when there is an ongoing gesture since click event from
mouse should be intended.
Bug: 116459737
Test: add a new test case in MotionEventInjectorTest
Test: a11y CTS & unit tests
Change-Id: I2c2be8cf565ba15d1a9cd6bc8c45b695c1309b56
Merged-In: I2c2be8cf565ba15d1a9cd6bc8c45b695c1309b56
After a failed gesture, TouchExplorer was trying to announce
the transition to touch exploration mode. Since TouchExplorer
doesn't enter this mode, stop notifying a11y services.
Besides, don't announce the end of the touch interaction if users
don't lift the fingers.
Bug: 118724767
Test: A11y CTS & unit test
Change-Id: I0320c47ac82e5371ef20c5bd16ef2d059ebad6f6
and the mechanism to use it
Since both starts and bindings might be contributing to the service
being whitelisted, track the state in ServiceRecord and update
the parent process accordingly when changes happen.
While we're at it, add that flag for bindings to accessibility
services, voice interaction services and QSTiles.
Also, make the timeout constant configurable for start-based
whitelisting.
Bug: 124298522
Bug: 123495976 (accessibility services)
Bug: 123337181 (paying via NFC, like Google Pay)
Bug: 122887611 (binding to InCallService)
Bug: 127774234 (binding to QSTile)
Bug: 124288681 (binding to voice interaction services)
Test: atest WmTests:ActivityStarterTests
Test: atest AccessibilityServiceConnectionTest
Test: manual with:
1) notifications from calendar and dynamite to test service starts
whitelisting
2) enabling talkback and livetranscribe to test service bindings
whitelisting
3) adding the LastPass QSTile and clicking on it
Change-Id: I8b6f23f999683920411ca40ab5b25c688a4f7055
When no WindowsForAccessibilityCallback is registered or no a11y
service watches events affected the active window, mActiveWindowId
won't be updated accordingly. This causes some a11y events can't
be dispatched due to mismatch of window id.
We need to add TYPE_WINDOW_STATE_CHANGED event to relevantEvents
in order to keep mActiveWindowId up-to-date once the packages are
not excluded from whitelist.
Bug: 118096360
Test: a11y CTS & unit test
Change-Id: Id139572cd350ba5d1b1927fe1fc94dc0d8ec6279
Support to expose the apps accessing accessibility features in the
permission hub. Start logging each time any data goes to services.
Bug: 122615167
Test: a11y CTS & unit test
Change-Id: I21f92dad8b3ec2e59a8ad6d180dc466357347784
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