When taking the screenshot, passing the width and height
of the display, and the rotation according to the current
device orientation.
Bug: 153173726
Test: a11y CTS & unit tests
Test: manual test
Change-Id: I19eea2046da282155719b1dfdf9a3f53ad95e13b
Add a private global action to be made public in S. A service can
trigger the event by calling performGlobalAction(10) in R.
Note: Currently 10 is being used by SystemActions for the Accessibility
shortcut. Update ag/10921262 to avoid a conflict.
Bug: 154038741
Test: Tested with modified TalkBack and Youtube play/pause
Change-Id: I3ca5d25948bfb3eb8520030484cb466ec7188784
Based on the change of this patch, ag/10633571,
Convert ScreenshotGraphicBuffer to ScreenshotHardwareBuffer, on
master branch only, re-porting this CL, ag/10700743, from rvc-dev
to master.
Bug: 153398112
Test: a11y CTS & unit tests
Change-Id: Iee1ed715f8912569c8db4a7297ee5ef4990e9e70
This change just add the interface and the method.
We'll apply this change in the later change.
So that magnification button UI will be updated by
showMagnificationButton() when magnification mode or
capability settings changed.
Bug: 145780606
Test: atest WindowMagnificationConnectionWrapperTest WindowMagnificationManagerTest
Change-Id: I544b03f62a0a67318585620db61caaa6dc213206
An a11y service targeting sdk version > Q and requesting a11y button
should be turned on by the Settings when it's assigned to the a11y
shortcut by the user. An a11y button callback is sent to the a11y
service when the user long press the a11y shortcut.
This issue happened when an disabled a11y service is assigned to the
a11y shortcut, and upgraded to the target sdk version > Q. Framework
fails to send the callback and no response when user long press the
shortcut.
Turns on the a11y service and show up a toast to fix this issue.
Bug: 153517972
Test: atest AccessibilityShortcutControllerTest
Change-Id: Ie4fc9bbeaf08ba674cfe6382eab214b2a15c004c
request window magnification connection through IstatusBar only
when magnification mode is window and magnification state is enabled.
Bug: 152578960
Test: WindowMagnificationManagerTest
Change-Id: I4e00448d9b64f9fd04fa5a5758bd41b2d2c8352f
This is relevant when running cts tests in instant mode.
Certain tests were failing in non-system users in instant mode, which is particularlly consquential to auto.
THis fix will be cherry-picked back to their repo
Test: CTSAccessibility*, in both instant/non-instant, and with both system and secondary users.
Bug:146218533
Change-Id: I89937bd552d372adc5d96c51b24d1a2bb4a034e3
When the magnification mode is changed, create the correspoding
MagnificationGestureHandler based on the magnification mode and
replace it with the old one.
Bug: 152578960
Test: AccessibilityUserStateTest
Test: AccessibilityInputFilterTest
Change-Id: Ifbcb771762b660183235292d3d35de3213064573
WindowMagnificationGestureHandler detects gestures to determine the
user is going to manipulate window magnifier. If the user is going to
interact with current UI, it will sends the delayed events, otherwise
it will change the scale or move the window magnifer based on user's
gesture.
Bug: 146400227
Test: manual test & WindowMagnificationManagerTest
Test atest WindowMagnificationGestureHandlerTest
Change-Id: I185005d1ebb00a4d3956104fc78fab7d46777d4d
The Accessibility events order for gesture end and touch interaction
end are exchanged in following conditons:
1. touching duration is very short.
2. Hover exit events comes right away after receving
action_up.
It leads to incorrect state of touchExplorer and sending incorrect
hoverevent in next touch-interaction.
In unit test part, there are two changes:
1. TestHandler used in current thread to reduce the execution time.
2. Add the created order of the mesaag to compare MsgInfo so that
it has correct order in the queue.
Bug: 152265599
Test: atest FrameworksServicesTests:com.android.server.accessibility.gestures
Test: atest android.accessibilityservice.cts.TouchExplorerTest
Test: manual test
Change-Id: Ia60d51414dd63a2a30be61372e8fbd2e3d9f723f
Tests indicate starting up AccessibilityManagerService takes 5ms longer
than expected and may be due to ag/9726764. Unsure how that change
could cause it, but we can take action and avoid initializing
SystemActionPerformer on start up.
Bug: 145909124
Test: builds and registers actions
Change-Id: Id7b8d5bfc450f96691b1810bf701644a0b1ef637
The accessibility service connection uses old service info
to create connection while the system is trying to rebind the
enabled services after packages finished updated. The root
cause is we always reloaded the installed service info after
the a11y services were rebound. To fix this issue, always
reloads the installed service info before rebinds the services.
Bug: 152817355
Test: All a11y related cts tests
Change-Id: Iab424940fc47b5a5f44096d67dc7bdfe2d43c5be
See b/152932464#comment1 for the analysis.
Fix a race where #unlinkToDeath might be called without a preceding
call to #linkToDeath and result in an exception.
Bug: 152932464
Test: presubmit
Change-Id: I061b314ebd895a400b1bb2e2956233775d5816e5
Bug: 150395371
Test: make && flashall
Bitmap is replacing methods that use a hidden GraphicBuffer with ones
that use the public HardwareBuffer. ScreenshotGraphicBuffer is just a
holder for GraphicBuffer and some metadata; switch it to hold a
HardwareBuffer (and rename to match).
Remove GraphicBuffer#createFromExisting, which was only called by
ScreenshotGraphicBuffer#createFromNative. Also remove JNI references to
that method, which were no longer in use.
Switch uses of GraphicBuffer that retrieve it from a
ScreenshotGraphicBuffer to HardwareBuffer.
Changes are almost entirely mechanical:
- (Screenshot)GraphicBuffer -> (Screenshot)HardwareBuffer
- GraphicBuffer#destroy -> HardwareBuffer#close
- getGraphicBuffer -> getHardwareBuffer
When creating a Snapshot in SurfaceFreezer, use the ColorSpace of the
ScreenshotHardwareBuffer.
Remove GraphicBuffer#createFromExisting. This is no longer necessary,
and although it was marked UnsupportedAppUsage, go/nonsdk-dash shows no
usage.
Change-Id: I41cb03fb65432d208820a428783de82a9f152035
Creating a new API, screenshotWithoutSecureLayer(), to get the
graphic buffer of screenshot for all displays including non-default
display and virtual one. We can use it to support multi-display
of takeScreenshot() API.
Bug: 145893483
Test: a11y CTS & unit tests
Test: manual testing to take screenshot of second display which is a
monitor with chrome cast
Change-Id: I474c71f7e01d57b5a318b2a5bfb690a2e01c128c
- Target to fix migration issue to support a user revoked the accessibility shortcut before upgrading to R, but wants to to apply new hardware shortcut design in R.
- The switchbar of accessibility_shortcut_enabled was removed in (1/n), so we should also remove related checker in controller.
Bug: 142529032
Test: atest AccessibilityShortcutControllerTest
Change-Id: I48f8d88c4192e894b9e210221e5dc7e701344623
The Accessibility events order for gesture end and touch interaction
end are exchanged in following conditons:
1. touching duration is very short.
2. Hover exit events comes right away after receving
action_up.
It leads to incorrect state of touchExplorer and sending incorrect
hoverevent in next touch-interaction.
Bug: 150171638
Test: atest FrameworksServicesTests:com.android.server.accessibility.gestures
Test: atest android.accessibilityservice.cts.TouchExplorerTest
Test: manual test
Change-Id: Ia60d51414dd63a2a30be61372e8fbd2e3d9f723f
MagnificationGesturesObserver is used to detect the gestures when
users start to have interaction with the devices through fingers.
If users swipe, single tap or single tap and hold, it means users want
to interact with the UI. If users put two fingers down, it means users
are going to do gestures for magnification operation.
Test: MagnificationGesturesObserverTest
Bug: 149269335
Change-Id: I34ff0694b82ff76c462007f74938e79272d667b4