We moved most of magnification-related stuff to MagnificationController
to centeralize the common magnification logic and the interaction
between magnification modes.
Test: atest CtsAccessibilityServiceTestCases
atest com.android.server.accessibility
atest com.android.server.accessibility.magnification
Change-Id: I30face9d94a29844dfa1d4a98139628bf1d79fec
Hide all non-important child nodes and make the root
could the ability to get accessibility focus.
Test: manually test with Talkback
Bug: 143852371
Change-Id: I89155ce969e4688e5a07f0b427b0fe99626cfc8a
First we get the current center of magnification bounds and the scale,
then apply them after the disabling animation is completed.
If disabling animation is interrupted, we will fall back to previous
mode or force to switch the mode directly.
Bug: 161669184
Test: atest com.android.server.accessibility.magnification
atest AccessibilityManagerServiceTest
Change-Id: Ic12d6d907f91bf251aa67a6ab959d4fbcf660f63
We send callback when the animation is canceled/reversed due to
the new quest while animating.
Bug: 161669184
Test: atest com.android.systemui.accessibility
atest com.android.server.accessibility.magnification
Change-Id: Iecd5e1bcf0ac097d4271ff0d277872b1dab0c63d
WindowMagnificationManager monitors the screen state.
And when requestConnection(false) is called before
requestConnection(true), the broadcastReceiver would be unregistered
even it is not registered yet. And it may lead to crash.
Bug: 167804868
Test: atest WindowMagnificationManagerTest
Change-Id: Ib61b00afe79d21a5e944affe8c5492aef90f0399
Two window types, INPUT_METHOD and INPUT_METHOD_DIALOG are group
into a single A11y window type, TYPE_INPUT_METHOD, at A11y
framework such that A11y services could not do correct behavior
when the input method dialog shows. Splitting out the
INPUT_METHOD_DIALOG and mapping it to TYPE_APPLICATION to fix
this issue.
Bug: 154315649
Test: a11y CTS & unit tests
Change-Id: I263398b20e75f48afebbe8d002994a00a110abdc
To handle the transition issue, we would like to add this callbck
both in full-screen and window magnification.
Bug: 161669184
Test: atest FullScreenMagnificationControllerTest
Change-Id: I590871386f885827126a1f21937780d3e6e918d0
UiAutomation should have an option not to engage accessibility.
go/uiautomation_not_use_a11y
Bug: 93087044
Test: atest UiAutomationManagerTest, atest CtsUiAutomationTestCases
Change-Id: Icc6c359844817a07869a18345fe44ef3b2813dae
We used the original down location while injecting all down events.
It accidently increases the velocity in the beginning and cause
Launcher detect the wrong gesture.
To fix it, we adjust the down time to real downTime.
Test: manually test
Bug: 165896230
Change-Id: I318dbc2af04298a21b9efe99278285911f56b1a0
To support switching magnification mode, we add callback to know
when the animation is finished. We only invoke the newest callback
when the animation is end successfully or the spec didn't change
Bug: 161669184
Test: atest com.android.systemui.accessibility
atest com.android.server.accessibility.magnification
Enable window magnification to see if it works normally
Change-Id: I34ce39d133a000964d1089946b7bcf510a618b40
We inject the down events from where we detect the 3-finger swipe
gesture. It may not trigger the A11y Button if the event is not inside
the system gesture detection area.
We inject the original down location to injection all down events.
Bug: 166187595
Test: manually test
Change-Id: I0c0f84047fc24e40724332d51d7e3dc414bd0186
Throughout the gesture system we scale the touch slop radius to the number of fingers that are down at any given moment. Therefore the correct value to
trigger two-finger passthrough should be 2 * mTouchSlop.
This should make three-finger taps less problematic.
Bug: 163438921
Bug: 162521649
Test: manual
Change-Id: I4b36b5575bf11ad767d83effd6292dc84eadb27d
Change-Id: I9fb9d58ef679151c9fc595bcb375f6209ea3a5af
Change-Id: Ibcae2a5a3fde37b97859165efabf2b0df13ded9b
The root cause is that the enabled state is not updated when
screen is off.
So correct to use disableWindowMagnifier(displayId, false) to
disable window magnifier. And it can update the enabled state,
mEnabled, when it is called.
Bug: 163784304
Test: atest WindowMagnificationManagerTest,atest WindowMagnificationGestureHandlerTest
Change-Id: I62a5aeaf45a3df62ef995906f25129125b4e85d5
We accidentky checked invalid pointers down position.
In stead of checking all pointers, we check the pointer ids
from the motion event.
Bug: 165576902
Test: manually test
atest TouchExplorerTest
Change-Id: Id530bf4b760351215726b2afd781433b590f57ce
This does not apply when transitioning from touch exploration to dragging.
Bug: 162521649
Test: manual
Change-Id: I92022ca0359040a6563e6a48c110face574dc9df
1. Rename isClientInWhitelist to isClientInAllowlist
See https://source.android.com/setup/contribute/respectful-code for
reference
Bug: 162536543
Test: Build & run
Change-Id: I915e09e4e64d5c268630cec2d0ef05ea0592fd6f
Merged-In: Ibbd97bf31915d59b5110cbcc8f2126f7a7221060
1) Only start delegating upon first move event, if all three fingers went down on the bottom edge.
2) The previous logic only required one finger to be in the edge boundary. It now requires all fingers to be in the edge boundary.
Bug: 162521649
Test: manual
Change-Id: I829c463c63b384642d129ff3b5ccdb0db816ddcd
The visiblity calculation of the embedded node relies on the parent
window bounds.Unfortunately, we report it only if the window is
covered by other windows.
We report it if this request is from an embedded hierarchy window.
Test: atest AccessibilityEmbeddedHierarchyTest on TV emulator
Bug: 155261657
Change-Id: I0033470cdeabf84dd2fa6158a9b7d46870aca556
The code was trying to set the location of the drag, but MotionEvent doesn't behave consistently when setting a single location to a multi-touch event.
All that's needed is to select the correct pointer, so removing messing with the location gives more consistent behavior.
Bug: 163105030
Change-Id: I6c315cf0a1e48847cc778ec8c34b382d13ce3555
Test: Manually testing at this point of the passthrough, and relying on treehugger.
Range check index into motion event x and y before using it.
Bug: 163107812
Test: Relying on treehugger. I can't reproduce the crash, so I'm just adding checks.
WindowMagnificationAnimationController provides same
functionality but it runs the animation while
enabling/disabling.
This new patch also fixs NPE excetion that happens
when device is in rotation but mirrorWindow is invisible.
Bug: 161669184 163026794 163035371
Test: atest com.android.systemui.accessibility
atest WindowMagnificationGestureHandlerTest
manual Test: enable window magnification to see it
2. close mirroe window and rotate the device
Change-Id: I4531f5c96ea4b91b287cc8c5ffc4c98fc9611dd5
- A redundant a11y button migration was called during the period
of enabled accessibility services restoring. It rewrited the
settings of a11y button targets which is restored.
- User could enable a11y services in the SUW. Merges previous vales
for a11y button targets after it's restored to avoid settings are
lost.
Bug: 160752945
Test: atest AccessibilityShortcutTest
Test: Manual restore from SUW
Change-Id: If55f4839c6ab0c648a35d47c9032e4b9954c0d5c
To support transition animation while switching magnification mode,
We add the callback to know when the animation is finished.
Bug: 161669184
Test: FullScreenMagnificationControllerTest
Change-Id: I002e0a818a38d5928d98741284c68f6236745b6f
Add sourcebounds change callback so that A11yFramwork could know
the center. It is also for magnification public API callback
Bug: 161669184
Test: WindowMagnificationControllerTest
Change-Id: I08c1f9c6f9f5eb540d960c89388b93437d79871a
This CL includes all subsequent fixes that were caused by the original change.
Bug: 159168795
Test: atest TouchExplorerTest
Change-Id: I416b90cf49a2804890246f2d52ee3a168059630f
Change-Id: Ibecc5f6cd1cdb682d1026869f6aa03da7f123e08